SCCM: Tampering with Deployment Boundaries for Privilege Escalation

In large-scale enterprise environments, centralized software deployment automation provides tremendous operational efficiency for both employees and IT departments. However, delegating software installation self-service to unprivileged users introduces subtle security boundary assumptions that attackers can exploit to achieve local privilege escalation (NT AUTHORITY\SYSTEM). When standard enterprise users are permitted to initiate software installations on demand via Software Center, third-party installer packages are often executed within the SYSTEM security context. Because most commercial software installers were originally engineered assuming an interactive local administrator session rather than automated headless deployment, this architectural mismatch creates high-impact security vulnerabilities: DLL search-order hijacking, insecure temporary directory usage, and file-creation race conditions. ...

August 1, 2025 · 7 min · 1324 words · Ahmad Mahfouz

Learning How to Learn: Cognitive Strategies and Mental Models for Engineers

Technical engineering domains—systems security, reverse engineering, kernel architecture, and network protocols—require assimilating dense, complex information rapidly. Mastering technical skills is not simply a function of study hours; it depends on understanding the underlying cognitive mechanics of human memory and information retention. 1. Focused vs. Diffuse Thinking Modes The human brain alternates between two distinct cognitive operating modes: Focused Mode: High-concentration, direct analytical attention focused on solving known problem sets using familiar neural pathways. Diffuse Mode: Big-picture, subconscious contemplation occurring during relaxation, walking, or resting. Diffuse thinking allows disparate regions of the brain to synthesize novel connections and resolve conceptual roadblocks. The Pomodoro Technique To prevent cognitive fatigue while training focused attention: ...

November 16, 2018 · 3 min · 441 words · Ahmad Mahfouz

Investigating SELinux AVC Denials with ausearch and Centralized Rsyslog

When SELinux operates in enforcing mode, policy violations are intercepted and logged as Access Vector Cache (AVC) denial records in the Linux audit subsystem (/var/log/audit/audit.log). Diagnosing blocked operations efficiently requires mastering ausearch and establishing structured log routing. 1. Querying AVC Denials with ausearch The ausearch utility parses the binary-formatted audit logs to isolate specific event types and translate raw numeric IDs into human-readable strings. Find All AVC Denials Generated Today ausearch -m avc -i -ts today -m avc: Filters events specifically matching the AVC (Access Vector Cache) audit record type. -i: Interprets numeric identifiers into human-readable text (resolves UIDs to usernames, GIDs to group names, and syscall numbers to system call names). -ts today: Limits the search timeframe to the current calendar day. Additional Useful Filters # Query denials by executable name ausearch -m avc -c httpd -ts recent # Query denials by process ID (PID) ausearch -m avc -p 1234 # Check for AVC denials alongside system audit messages ausearch -m avc,user_avc,selinux_err -i 2. Converting AVC Denials into Remediation Rules To examine why an operation was blocked and generate human-readable policy recommendations: ...

July 23, 2016 · 2 min · 357 words · Ahmad Mahfouz

Monitoring Linux Infrastructure with Performance Co-Pilot (PCP) and Web UI

Performance Co-Pilot (PCP) is an enterprise-grade system performance analysis and telemetry framework. Developed to monitor large distributed environments, PCP gathers live and historical metrics covering kernel internals, hardware subsystems, file systems, disk I/O, memory pressure, and networking. 1. Installation and Daemon Setup On Red Hat Enterprise Linux, CentOS, or Fedora, install the core PCP packages: sudo yum install -y pcp pcp-webjs Performance Metrics Collector Daemon (pmcd) pmcd acts as the primary coordinator, querying Performance Metric Domain Agents (PMDAs) for subsystem statistics: ...

July 23, 2016 · 2 min · 419 words · Ahmad Mahfouz

Automating Social Media Post Reactions and Page Invites with JavaScript

When marketing campaigns or organic posts achieve high engagement, many users interact with the content (likes, reactions) without following or liking the parent page. Facebook provides a manual interface to invite users who reacted to a post to like the page. However, manually clicking hundreds of individual invite buttons is tedious. Figure 1: Modal window listing users who reacted to the post. Browser Console Automation Script By executing a lightweight script in the browser’s Developer Tools Console, we can automate scrolling through pagination (See More) and dispatching invite clicks with controlled delays to respect client-side rate limits. ...

July 21, 2016 · 2 min · 356 words · Ahmad Mahfouz

Docker Persistent Storage for MySQL with SELinux Enforcement

Running stateful services like MySQL inside Docker containers requires mapping data volumes to host storage. On enterprise Linux distributions running SELinux in enforcing mode (such as Red Hat Enterprise Linux, CentOS, or Fedora), containerized processes are isolated using Type Enforcement and Multi-Category Security (MCS). If the host directory lacks the appropriate SELinux context and file permissions, the MySQL daemon will encounter Permission denied errors during database initialization. 1. Pull the Official MySQL Image Retrieve the official MySQL container image from Docker Hub: ...

July 16, 2016 · 3 min · 457 words · Ahmad Mahfouz

Fixing phpMyAdmin Error #1146: Table 'phpmyadmin.pma_tracking' Doesn't Exist

When navigating through phpMyAdmin, you may encounter the following error: #1146 - Table 'phpmyadmin.pma_tracking' doesn't exist Figure 1: Missing internal configuration storage tables in phpMyAdmin. This error indicates that phpMyAdmin’s internal metadata and configuration storage database (phpmyadmin) was either skipped during initial package installation or failed to execute its SQL initialization scripts. Solution 1: Reconfigure via dpkg-reconfigure (Recommended) On Debian and Ubuntu systems, the cleanest method to repair the metadata database is using dbconfig-common via dpkg-reconfigure: ...

June 26, 2016 · 1 min · 204 words · Ahmad Mahfouz

Enabling Passwordless Login in phpMyAdmin for Local Development

When configuring a local development environment (such as on a virtual machine or local development container) where MySQL root has an empty password, phpMyAdmin blocks authentication attempts by default with the following error: Login without a password is forbidden by configuration (see AllowNoPassword) This security safeguard prevents accidental deployment of passwordless database instances in publicly accessible environments. Enabling Empty Passwords in config.inc.php To enable passwordless authentication for local sandbox testing, modify the phpMyAdmin configuration file: ...

June 26, 2016 · 1 min · 153 words · Ahmad Mahfouz

Resolving PHP Mcrypt Extension Symlink Conflicts on Ubuntu Server

When configuring legacy PHP environments on Ubuntu Server and attempting to activate the mcrypt cryptographic module, administrators may encounter symlink collision warnings. The Error Condition After installing the extension packages: sudo apt-get install mcrypt php5-mcrypt Attempting to register the module via php5enmod produces the following error: root@ubuntu:~# php5enmod mcrypt WARNING: Not enabling the mcrypt module for apache2 SAPI since module symlink WARNING: already exists in /etc/php5/apache2/conf.d with different content. WARNING: Not enabling the mcrypt module for cli SAPI since module symlink WARNING: already exists in /etc/php5/cli/conf.d with different content. This error occurs when old or stale configuration symlinks pointing to prior configuration targets exist in the SAPI configuration directories (/etc/php5/apache2/conf.d/ and /etc/php5/cli/conf.d/), preventing the package manager from linking the canonical /etc/php5/mods-available/mcrypt.ini. ...

June 26, 2016 · 1 min · 178 words · Ahmad Mahfouz

Regular Expressions for Extracting MAC Addresses in Incident Response

During digital forensics and incident response investigations, analyzing DHCP leases, ARP caches, firewall events, and syslog entries often requires extracting physical network hardware addresses (MAC addresses). A standard IEEE 802 MAC-48 address consists of six groups of two hexadecimal digits separated by colons (00:1A:2B:3C:4D:5E) or hyphens (00-1A-2B-3C-4D-5E), or three groups of four hexadecimal digits separated by dots (001a.2b3c.4d5e). 1. Extracting MAC Addresses with grep Standard Colon-Separated Format To extract colon-delimited MAC addresses using extended regular expressions (grep -E): ...

July 31, 2015 · 2 min · 231 words · Ahmad Mahfouz