Linux/CDorked.A
Techniques & procedures
21 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
4 techniques
Execution
The HTTP server is equipped with a reverse connect backdoor that can be triggered via a special HTTP GET request. It is invoked when a request to a special path is performed with a query string in a particular format, containing the hostname and port to connect.
181944 cmdline:bash-cecho GOOD exec: tid = 181944 pid = 181944 /bin/bash ... 181981 cmdline:/bin/sh/sbin/servicehttpdstop exec: tid = 181981 pid = 181981 /bin/bash
All the information related to the backdoor is stored in shared memory
sent us a modified version of an Apache webserver redirecting some of its requests... The backdoor leaves no traces of compromised hosts on the hard drive other than its modified httpd binary
Persistence
2 techniques
Persistence
The HTTP server is equipped with a reverse connect backdoor that can be triggered via a special HTTP GET request. It is invoked when a request to a special path is done with a query string in a particular format
There are two ways the attacker can control the behavior of the backdoored server: through a reverse connect shell or through special commands, all of them are triggered via HTTP requests.
Stealth
10 techniques
Stealth
My instinct was right and I found out a new variant of Linux/CDorked.A... It could be either a kernel rootkit (Crowdstrike’s analysis of such rootkit here), an Apache module, or something else... Voilá, __syslog_chk was hooked and redirect into libkeysutils.so.1.3 library. This is an upgraded sshd rootkit version.
In the Linux/Cdorked binary all the important or suspicious strings are encrypted... decrypting the strings on demand with a static XOR key.
Three foreign binaries are installed in the filesystem, all three ending in space to hide in plain sight: '/usr/bin/s2p ', the trojaned httpd. '/usr/sbin/arpd ', the original httpd. '/usr/sbin/tunelp ', touch2 to restore time of original apache.
The HTTP request does not appear in Apache's log file due to the way the malicious code is hooked into Apache.
The original binary has been deleted! Definitely a good clue to understand why the httpd binary checksums are always ok... starts it again, and replaces again the trojaned binary with the original copy.
'/usr/sbin/tunelp ', touch2 to restore time of original apache... 182019 cmdline:touch-r/usr/sbin/arpd /usr/local/apache/bin/httpd
The HTTP server is equipped with a reverse connect backdoor that can be triggered via a special HTTP GET request. It is invoked when a request to a special path is done with a query string in a particular format
The backdoor leaves no traces of compromised hosts on the hard drive other than its modified httpd binary... All of the information related to the backdoor is stored in shared memory.
sent us a modified version of an Apache webserver redirecting some of its requests... The backdoor leaves no traces of compromised hosts on the hard drive other than its modified httpd binary
our analysis of this malware, dubbed Linux/Cdorked.A, reveals that it is a sophisticated and stealthy backdoor meant to drive traffic to malicious websites.
Defense Impairment
1 technique
Defense Impairment
if you try to just replace the bad binary with a good one, you will be denied, because they set the file attribute to immutable. So you have to run chattr -ai before replacing it
Lateral Movement
1 technique
Lateral Movement
Now I could see a strange incoming SSH connection executing commands and after that the trojaned Apache was running... An incoming sshd connection stops the original Apache, copies over the trojaned version, starts it again, and replaces again the trojaned binary with the original copy.
Command and Control
5 techniques
Command and Control
Running the ipcs command revealed a very suspicious shared memory segment... slightly bigger than the one mentioned in those articles and detection tools.
The configuration is pushed by the attacker through obfuscated HTTP requests that aren't logged in normal Apache logs.
The configuration is pushed by the attacker through obfuscated HTTP requests that aren’t logged in normal Apache logs.
on some random requests (once per day per IP address) instead of just displaying the content, it also adds a malicious redirect. That causes the browser to load content from what seems to be random domains
The HTTP server is equipped with a reverse connect backdoor that can be triggered via a special HTTP GET request. It is invoked when a request to a special path is done with a query string in a particular format
Impact
1 technique
Impact
In the sample we analyzed, the payload--which resides in memory, not on the hard drive--was redirecting web traffic, from the web server infected by Linux/Cdorked, to websites that seek to infect visitors via the Blackhole Exploit kit.
Observables
15 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.