Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ MMD-0051-2016 - Debungking a tiny ELF remote backdoor (shellcode shellshock part 2)

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š MMD-0051-2016 - Debungking a tiny ELF remote backdoor (shellcode shellshock part 2)


๐Ÿ’ก Newskategorie: Malware / Trojaner / Viren
๐Ÿ”— Quelle: blog.malwaremustdie.org

The background

In September 2014 during the shellshock exploitation was in the rush I analyzed a case (MMD-0027-2014) of an ELF dropped payload via shellshock attack, with the details can be read in-->[here]

Today I found an interesting ELF x32 sample that was reported several hours back, the infection vector is also ShellShock, the reporter seems didn't know whether the ELF binary is malicious or not..nor knowing which kind of malware it is, so I decided to dissect it, hoping this information will help security community to use as reference for similar sample.

The ELF binary looks like this:

It was statically compiled ELF in Intel 32bit architecture.

Studying the sample

As I fond of shellcode myself as a hobby, seeing the hex and stripping the ELF header, I can see the shellcode inside started from 31 db f7 e3 53 43 53 6a 02 b0 66 ..until.. cd 80 ff e1.

Compared to the previous mentioned case, this shellcode is a way much shorter, could be part of something bigger that was cut to whatever purpose, or a partial module of the threat series, anyhow I decided to check it out, and of course, with radare. Firing up, it looks plain and simple assembly as per below, which disassembled the opcodes correctly in 80386(x86-32) language:

In a glimpse, this shellcode looks the same to what we had before, but it is slightly different and again, shorter. So now all we have to do is to describe how dos it work.

Dissection of the evil opcodes

I breakdown the codes into its calls & processes, and the result is as per below:

What it says from line number 3 to 25 (xref: 0x08048054 to 0x0804807a) in plain English is:
Firstly this ELF shellcode part called the socket, set it with as internet connection used socket (PF_INET) to a certain IP address and port number (both are hard coded in hex/see the picture above), assuming the back connection is being made to the remote machine. I see the same procedure is used in same reverse-shell malware shellcode basis or some malicious shellcode itself. This part is happened more or less similar as previous case I dissected in Sept 2014 (linked above).

However, the rest of the lines is the interesting point of this threat.

in 0x0804807c it strictly setting the memory space (in the stack) to be set to 7, and this means the stack setting(PROT_READ, PROT_WRITE, PROT_EXEC) flag is set to readable, writeable and executable (code from 0x0804807e to 0x0804808d is about this setting..called sys_mmap2 w/def size w4096 and called sys_mprotect..in C is a malloc part).

Up to this point the badness is smelled strong. The next operation will explain the bad activity very well, in 0x0804808f it restores the socket and then reads the data from the socket (ref 0x08048095 in executed syscall0x03 READ) and it's saved the data to the stack (which is read/write/exec-able now).
The described current process is up to 0x08048097 now (we are here).

The next, the last code in address 0x08048099 is a jump to ecx register which contains the pointer to the saved data in she stack, Yes, which can mean the execution of the whatever data saved in the alloc'ed stack (memory).

The implementation for this backdoor can be widely used for so many further badness to be installed/sent to any successful injected host. We'd better to take more attention awareness of it. i.e. The most imaginable followup for this threat is the injection of the shell ELF binary itself via this backdoor. The threat is already in the wild folks, awareness is a must, there is no need to hush hush about this ,natter which making our fellow sysadmins (like a friend who got this in his server) doesn't know much info about this threat.

Behavior analysis

During the run sysadmins in any infected machine will see the operations triggered by the malware as per below in kernel space:

And of couse, the segmentation fault will occur for the obvious reason, which I will not stated in here for the security reason.

The sample, epilogue & follow up

The sample is in Virus Total that can be accessed in here-->[link]
I am also added the Shellshock Shellcode compiles malware to its thread in kernelmode in here -->[here]

NOTE:The follow up of this case will be posted in here. To be noted, there are few opcodes that might have slight different translation, please bear to some small miss (if any) but I am sure the overall analysis is correct.

#MalwareMustDie! | analysis by @unixfreaxjp

...













๐Ÿ“Œ MMD-0027-2014 - Linux ELF bash 0day (shellshock): The fun has only just begun...


๐Ÿ“ˆ 50.22 Punkte

๐Ÿ“Œ MMD-0030-2015 - New ELF malware on Shellshock: the ChinaZ


๐Ÿ“ˆ 50.22 Punkte

๐Ÿ“Œ MMD-0027-2014 - Linux ELF bash 0day (shellshock): The fun has only just begun...


๐Ÿ“ˆ 50.22 Punkte

๐Ÿ“Œ MMD-0030-2015 - New ELF malware on Shellshock: the ChinaZ


๐Ÿ“ˆ 50.22 Punkte

๐Ÿ“Œ Making of Tiny Bobble, Tiny Galaga, Tiny Invaders & Tinyus


๐Ÿ“ˆ 38.03 Punkte

๐Ÿ“Œ MMD-0037-2015 - A bad Shellshock & Linux/XOR.DDoS CNC "under the hood"


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0035-2015 - .IptabLex or .IptabLes on shellshock.. sponsored by ChinaZ actor


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0029-2014 - Warning of Mayhem shellshock attack


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0037-2015 - A bad Shellshock & Linux/XOR.DDoS CNC "under the hood"


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0035-2015 - .IptabLex or .IptabLes on shellshock.. sponsored by ChinaZ actor


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0029-2014 - Warning of Mayhem shellshock attack


๐Ÿ“ˆ 37.44 Punkte

๐Ÿ“Œ MMD-0051-2016 - Debungking a tiny ELF remote backdoor (shellcode shellshock part 2)


๐Ÿ“ˆ 37.3 Punkte

๐Ÿ“Œ MMD-0051-2016 - Debunking a tiny ELF remote backdoor (shellcode shellshock part 2)


๐Ÿ“ˆ 37.3 Punkte

๐Ÿ“Œ MMD-0051-2016 - Debungking a tiny ELF remote backdoor (shellcode shellshock part 2)


๐Ÿ“ˆ 37.3 Punkte

๐Ÿ“Œ netbeans-mmd-plugin up to 1.4.3 MMD File Import Request XML External Entity


๐Ÿ“ˆ 34.78 Punkte

๐Ÿ“Œ netbeans-mmd-plugin bis 1.4.3 MMD File Import Request XXE erweiterte Rechte


๐Ÿ“ˆ 34.78 Punkte

๐Ÿ“Œ #0daytoday #Linux/x86 Tiny Read Polymorphic Shellcode (75 bytes) [shellcode #0day #Exploit]


๐Ÿ“ˆ 33.28 Punkte

๐Ÿ“Œ Shellcode-Encrypter-Decrypter - Shellcode Encrypter & Decrypter By Using XOR Cipher To Encrypt And Decrypt Shellcode


๐Ÿ“ˆ 30.9 Punkte

๐Ÿ“Œ [shellcode] Linux/ARM64 - Jump Back Shellcode + execve("/bin/sh", NULL, NULL) Shellcode (8 Bytes)


๐Ÿ“ˆ 30.9 Punkte

๐Ÿ“Œ [shellcode] Linux/ARM - Jump Back Shellcode + execve("/bin/sh", NULL, NULL) Shellcode (4 Bytes)


๐Ÿ“ˆ 30.9 Punkte

๐Ÿ“Œ MMD-0026-2014 - Router Malware Warning | Reversing an ARM arch ELF AES.DDoS (China malware)


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0047-2015 - SSHV: SSH bruter ELF botnet malware w/hidden process kernel module


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0045-2015 - KDefend: a new ELF threat with a disclaimer


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0043-2015 - Polymorphic in ELF malware: Linux/Xor.DDOS


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0039-2015 - ChinaZ made new malware: ELF Linux/BillGates.Lite


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0032-2015 - The ELF ChinaZ "reloaded"


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0034-2015 - New ELF Linux/DES.Downloader on Elasticsearch CVE-2015-1427 exploit


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0028-2014 - Fuzzy reversing a new China ELF "Linux/XOR.DDoS"


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0026-2014 - Router Malware Warning | Reversing an ARM arch ELF AES.DDoS (China malware)


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0047-2015 - SSHV: SSH bruter ELF botnet malware w/hidden process kernel module


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0044-2015 - Source code disclosure (part1) of bunch of ELF malware


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0045-2015 - KDefend: a new ELF threat with a disclaimer


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0043-2015 - Polymorphic in ELF malware: Linux/Xor.DDOS


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0039-2015 - ChinaZ made new malware: ELF Linux/BillGates.Lite


๐Ÿ“ˆ 30.16 Punkte

๐Ÿ“Œ MMD-0032-2015 - The ELF ChinaZ "reloaded"


๐Ÿ“ˆ 30.16 Punkte

matomo