Monarx Security Technical Overview Prevent Web Shells Before They Cause Damage
Total Page:16
File Type:pdf, Size:1020Kb
Monarx Security Technical Overview Prevent Web Shells Before They Cause Damage Monarx, Inc. HQ 8 E Broadway Salt Lake City, UT [email protected] 2 Table of Contents Executive Summary 3 Product Overview 4 Architecture and Deployment 9 Protect Feature Spotlight 11 Product Benefits 12 Complimentary Proof of Value 13 Conclusion 13 3 Executive Summary secured, these sites have a vast and diverse attack surface due to the broad and dynamic The Application and Cybersecurity community is set of poorly maintained plugins, themes, and focused on the symptoms of web server malware, extensions that are available. The very thing that not the source. attracts users to open source CMS also creates its largest security problem. The frequency and Internet-facing websites are a prime target for impact of successful attacks continues to rise to attackers to monetize and launch attacks. Web extraordinary levels. Furthermore, 71% of these Application Firewalls, Patching, and Malware attacks use a PHP-based backdoor/web shell Scanning solutions don’t solve the problem. after successful exploitation. When activated, the Despite the best efforts of Hosting Providers shells are used to modify source files, replicate and Enterprises, websites continue to be malicious code, deliver malware to website compromised by hackers. visitors, send spam, mine cryptocurrency, or participate in larger bot activities. Unfortunately, 38.11% of the internet’s websites run a PHP- these types of attacks are also the hardest to based open source CMS, and they are a prime diagnose and clean up. target for attackers. In addition to being poorly Webshell attacks typically have four stages: 1. An initial exploit is used to create an opening Web Application Security like Monarx plays a key to deposit a web shell (payload) role in stopping attacks before they become large 2. Web shell is deposited in a location cleanup projects, use up valuable resources, or accessible by the web server erode customer goodwill. 3. The web shell is activated (used) via internet Monarx can add value by delivering a new browser approach that achieves: 4. Files are modified or embedded across the • Automated, accurate prevention of Payload website, or the shell uploads tools (web shell) attacks without additional or additional web shells overhead to resources Monarx has developed a product that provides • Visibility into the initial attack vector to an unprecedented level of real-time protection prioritize patching and remediation against PHP web shell attacks. Monarx detects • A stop to the never-ending cleanup process and prevents all bad outcomes associated with and customers getting blacklisted web shell attacks, keeping websites safe before • Enhanced security with marginal impact on a successful attack can do damage. The software system and application performance also identifies all web shells and compromised • Broad coverage that includes on-prem, files already on the server. cloud, and hybrid environments This paper provides a technical overview of the components and approach that makes up the Monarx solution. 1 https://w3techs.com/ 4 Product Overview Monarx provides an Application Security solution to protect open source CMS Websites against the top attack method used to compromise these sites. Monarx does this with an easily deployable server-side agent that does not require any configuration or operational changes to an environment. This solution consists of four main components: Protect Hunter Dashboard PROTECT HUNTER Exploit detection and web Malware scanning module A cloud-hosted web-based shell prevention module That that discovers existing console for viewing detection tracks web shell payload compromises, including information, configuring deposits and blocks their standalone web shells settings, and generating execution. and compromised source reports. binaries. Agent A server-side agent that that is responsible for running Monarx modules and for communicating, configuring, and sending detection information to the Monarx Cloud. The Monarx Agent is the customer-installed component of the Monarx Solution consisting of the Agent and modules (Protect and Hunter). It was designed for the specific needs of shared and dedicated web Hosting providers and natively supports Hosting provider platforms such as cPanel, Plesk, and Cloud Linux, including cageFS. It also supports LiteSpeed, NGINX, and Apache web servers. The Agent downloads rules, discovers server configuration information, and executes client-side tasks such as scanning, diagnostics, and updating. The Agent is responsible for all secure communication between the local Monarx modules and Monarx Cloud. This includes detection events and detailed metadata from both Protect and Hunter modules at the server level, giving it visibility across all vHosts. To ensure maximum protection, the Agent should be installed on all supported web servers in a client’s environment. 5 MonarxHUNTER Hunter The Monarx Hunter is a PHP malware scanner Hunter uses two different scanning methods that is purpose-built to find standalone web for complete coverage, a weekly scheduled shells and compromised source files quickly full scan, and a real-time scan. Subsequent and efficiently. The Hunter is made up of two full scans help to determine metrics as part of components 1) An agent-based scanning ongoing client remediation efforts. The real- engine that leverages an evolving set of curated time scanner leverages the operating system YARA rules to find any potentially malicious or and Monarx Protect to analyze files as they get compromised PHP files. 2) A cloud processing deposited through the file system or PHP. When engine where files can be further analyzed using Hunter detects a malicious file, it provides a rich dynamic analysis, analytics, Machine Learning, set of information: signatures, and whitelists to keep false positives • Device Name low and avoids missing anything malicious. • Virtual host (s) The result: • Filename • Path • Standalone malicious files are categorized • Last Modified as web shells so they can be easily flagged for remediation or blocking with Protect. • Type (Web shell or compromised) • 3rd Party Anti-Virus Context • Compromised source files are categorized • SHA 256 as injected/compromised and malicious code is highlighted in the application. • Detection Rule (How Monarx found it) • A highlight of the exact line of malicious At agent install, Hunter automatically code (based on the detection rule) in a determines the web server’s doc/app roots for detailed view of the file as seen below efficient and targeted scanning. It also performs an initial full scan used for a compromise assessment. This establishes the current state of infection on a server before Monarx Protect is in place. Any files identified by Hunter are automatically added to Protect’s Watchlist feature to monitor web shell activity even As malicious files are introduced across the if Protect did not see the initial file deposit. userbase, Monarx Protect shares them with Files added to Protect from Hunter can also Hunter creating a more efficient hunting and be blocked, never allowing future activation, detection tool. As detection rates rise, insight thereby reducing remediation requirements for is gained into the latest methods of web shell stand-alone web shells. creation and obfuscation. 6 MonarxPROTECT Protect - Prevention Monarx Protect provides protection against and can block the execution before the web all PHP based web shells regardless of entry/ shell can be used. We call this approach Post deposit method. The software accurately Exploit Prevention because Protect does not identifies web shells as they are deposited and attempt to stop the exploit, instead it limits as they modify PHP scripts. Most commonly, resulting damage to zero by blocking the these files appear through exploits of a plugin, activation of the payload. theme, or extension or through an existing web shell. Protect prevents these files from being Because the exploit still occurs, the Monarx activated in PHP, thus preventing them from software also provides deep visibility into each doing any damage. attempted attack including how the malicious script got in, from where, and the origins of any Protect evaluates PHP file deposits based on activation attempts. Depending on the action our industry-leading entry vector determination type (Deposit or Activation) Protect captures the engine with no initial dependence on definitions, following attack information: patterns, advanced heuristics, regular expressions, or signatures – meaning Monarx • Date needs no prior knowledge of the exploit or • Device Name vulnerability. As a result, Protect does not have • Virtual Host the ‘false positive’ problem that is pervasive with traditional signature-based products. • Severity (Malicious/Suspicious) • Action (Prevent/ Detect) Protect lives in the application stack as a PHP • Detection Type (Activation/Deposit) module that observes how files are deposited and then executed by the server-side scripting • File Name engine. When Protect determines a file deposit • File Directory is malicious, it adds the file to the Protect • Entry URL Watchlist. The Watchlist is a component of Protect used to track PHP file introductions/ • Line Number modifications classified as malicious. When a • Exit file name PHP file is activated via the webserver, Protect • Execution Function Name compares the request to its watchlist to determine if it should generate an alert or block • IPv4 Address the action. • IP