SlideShare a Scribd company logo
Dissecting BetaBot
Raghav Pande
Researcher @ FireEye
Disclaimer
The Content, Demonstration, Source Code and Programs
presented here is "AS IS" without any warranty or
conditions of any kind. Also the views/ideas/knowledge
expressed here are solely mine and have nothing to do
with the company or the organization in which i am
currently working.
However in no circumstances neither me nor Cysinfo is
responsible for any damage or loss caused due to use or
misuse of the information presented here.
Content
Introduction
Static
Behavior
Anti R.E.
Injection
Hooking Methodology
Interesting Areas
Why Betabot?
Difficult to understand
No Cracked builder
No good Writeup
Super Duper Rootkit as Advertised
Complaint for Removal
Harassment for other Criminals
Information
Samples used can be downloaded from
malwarenet.com
Betabot 1.7 was used
Bot was analyzed on Win7 Sp1 64bit
Required Tools: Ollydbg, Windbg, x64dbg, Ida
Pro
Introduction
Typical Botnet but with good features
Botkiller
AV Killer
UAC SE trick
UserKit for x86/x64
Anti Bootkit
Usermode SandBox evasion
Proactive Defense
DnsBlocker/Redirect
File Search & Grab
Formgrabber for IE/FF/CH (x86 & x64) including SPDY grabber
Advert
Betabot
Static
Throw Wild binary in IDA
Unpacking
Unpacking 101: Throw in Olly
Bp @ ntdll!NtWriteVirtualMemory
Bp @ ntdll!NtResumeThread
Automate
Dump PE header
Unpacking
Unpacking
Place 0xEb 0xFe @ CreateProcessInternalW
No debugger usage
Automate
Attach Olly
Bp @ CreateProcessInternalW
Hit, Then Automate till
ntdll!NtWriteVirtualMemory comes up
Unpacking
Unpacking
Unpacking stage2
Unpacking stage2
Random Routine & POI
Unpacking stage2
Last Routine & POI
Unpacking Stage2
Et' Voila
Behavior
Anti RE
FS:[0x30] + 2
DbgBreakPoint() = 0x90
Ntdll!NtQueryInformationProcess()
Ntdll!NtSetInformationThread()
Behavior
NtQueryInformationProcess
Behavior
NtQueryInformationProcess
Note: [119f590] = address of ZwQuerySection
if [Ebp - 1] == 1 (debugger found)
modify Fs:[0xc0] from Far jump
0x0033:0x7*******
to ZwQuerySection
Behavior
EIP result
Behavior
Other aspects
Injection & Migration
CreateProcessInternalW(suspended)
CreateSection()
MapViewOfSection(), Unmap(),
MapViewOfSection()
CreateSection(2)
MapViewOfSection(), Unmap(),
MapViewOfSection(2)
ResumeThread()
ExitProcess()
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Injection & Migration
Hooks
How Normal Applications Hook and why
Hooks
32bit system without hooks
Hooks
32bit API on WOW64bit system without hooks
Hooks
3 different areas of hooking in Betabot
Hook @ KiFastSystemCall (strictly x86
Environment)
Hook @ Fs:[0xc0] (WOW64 handler for x86 API)
Hook @ 64Bit Api directly
Hooks
32bit
Hooks
Wow64
Hooks
64bit Process
Hooks
Explanation for 64bit handler
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
Interesting Areas
References
blog.gdatasoftware.com
kernelmode.info
Queries?

More Related Content

PPTX
Defeating public exploit protections (EMET v5.2 and more)
DOCX
Step by Step on How to Setup DarkComet
PDF
Nullcon Hack IM 2011 walk through
PDF
Ultimate Guide to Setup DarkComet with NoIP
PPTX
Automating malware analysis
PPTX
Malicious Client Detection using Machine learning
Defeating public exploit protections (EMET v5.2 and more)
Step by Step on How to Setup DarkComet
Nullcon Hack IM 2011 walk through
Ultimate Guide to Setup DarkComet with NoIP
Automating malware analysis
Malicious Client Detection using Machine learning

Viewers also liked (20)

PPTX
Fingerprinting healthcare institutions
PPTX
Breaking into hospitals
PPTX
Bluetooth insecurity
PPTX
Dll preloading-attack
PDF
Buffer overflow Attacks
PPTX
Watering hole attacks case study analysis
PDF
Dynamic Binary Instrumentation
PPTX
Advanced malware analysis training session1 detection and removal of malwares
PPTX
Advanced malware analysis training session5 reversing automation
PPTX
Advanced malware analysis training session4 anti-analysis techniques
PPTX
Dissecting Android APK
PPTX
Homomorphic encryption
PDF
Format string vunerability
PPTX
Advanced malware analysis training session8 introduction to android
PPTX
Reversing malware analysis training part11 exploit development advanced
PPTX
Advanced malware analysis training session11 part2 dissecting the heart beat ...
PPTX
Advanced malware analysis training session6 malware sandbox analysis
PPTX
Fingerprinting healthcare institutions
Breaking into hospitals
Bluetooth insecurity
Dll preloading-attack
Buffer overflow Attacks
Watering hole attacks case study analysis
Dynamic Binary Instrumentation
Advanced malware analysis training session1 detection and removal of malwares
Advanced malware analysis training session5 reversing automation
Advanced malware analysis training session4 anti-analysis techniques
Dissecting Android APK
Homomorphic encryption
Format string vunerability
Advanced malware analysis training session8 introduction to android
Reversing malware analysis training part11 exploit development advanced
Advanced malware analysis training session11 part2 dissecting the heart beat ...
Advanced malware analysis training session6 malware sandbox analysis
Ad

Similar to Betabot (20)

PPTX
Dissecting BetaBot
PPTX
44CON London 2015 - How to drive a malware analyst crazy
PPTX
How to drive a malware analyst crazy
PDF
Certiface e a tecnologia Intel no combate a fraude.
PPTX
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
PDF
Dev and Ops Collaboration and Awareness at Etsy and Flickr
PDF
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
PDF
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
PDF
Codeception Testing Framework -- English #phpkansai
PDF
Do bad things happen on Windows
PPTX
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
PDF
How Credential Stuffing is Evolving - PasswordsCon 2019
PPTX
Eyes or heart
DOCX
Backtrack Manual Part9
PDF
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
PDF
Understanding Non Blocking I/O with Python
PDF
Cluj.py Meetup: Extending Python in C
PPTX
Injection flaw teaser
PDF
David Thiel - Secure Development On iOS
PPTX
Reverse Engineering .NET and Java
Dissecting BetaBot
44CON London 2015 - How to drive a malware analyst crazy
How to drive a malware analyst crazy
Certiface e a tecnologia Intel no combate a fraude.
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Dev and Ops Collaboration and Awareness at Etsy and Flickr
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
Codeception Testing Framework -- English #phpkansai
Do bad things happen on Windows
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
How Credential Stuffing is Evolving - PasswordsCon 2019
Eyes or heart
Backtrack Manual Part9
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
Understanding Non Blocking I/O with Python
Cluj.py Meetup: Extending Python in C
Injection flaw teaser
David Thiel - Secure Development On iOS
Reverse Engineering .NET and Java
Ad

More from Cysinfo Cyber Security Community (20)

PDF
Understanding Malware Persistence Techniques by Monnappa K A
PDF
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
PDF
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
PPTX
Emerging Trends in Cybersecurity by Amar Prusty
PDF
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
PDF
Closer look at PHP Unserialization by Ashwin Shenoi
PDF
Unicorn: The Ultimate CPU Emulator by Akshay Ajayan
PDF
The Art of Executing JavaScript by Akhil Mahendra
PDF
Reversing and Decrypting Malware Communications by Monnappa
PPTX
DeViL - Detect Virtual Machine in Linux by Sreelakshmi
PPTX
Analysis of android apk using adhrit by Abhishek J.M
PDF
Understanding evasive hollow process injection techniques monnappa k a
PPTX
Security challenges in d2d communication by ajithkumar vyasarao
PPTX
S2 e (selective symbolic execution) -shivkrishna a
PPTX
Dynamic binary analysis using angr siddharth muralee
PPTX
Bit flipping attack on aes cbc - ashutosh ahelleya
PDF
Security Analytics using ELK stack
PDF
Linux Malware Analysis
ODP
Introduction to Binary Exploitation
PDF
ATM Malware: Understanding the threat
Understanding Malware Persistence Techniques by Monnappa K A
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
Emerging Trends in Cybersecurity by Amar Prusty
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
Closer look at PHP Unserialization by Ashwin Shenoi
Unicorn: The Ultimate CPU Emulator by Akshay Ajayan
The Art of Executing JavaScript by Akhil Mahendra
Reversing and Decrypting Malware Communications by Monnappa
DeViL - Detect Virtual Machine in Linux by Sreelakshmi
Analysis of android apk using adhrit by Abhishek J.M
Understanding evasive hollow process injection techniques monnappa k a
Security challenges in d2d communication by ajithkumar vyasarao
S2 e (selective symbolic execution) -shivkrishna a
Dynamic binary analysis using angr siddharth muralee
Bit flipping attack on aes cbc - ashutosh ahelleya
Security Analytics using ELK stack
Linux Malware Analysis
Introduction to Binary Exploitation
ATM Malware: Understanding the threat

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Modernizing your data center with Dell and AMD
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Machine learning based COVID-19 study performance prediction
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Modernizing your data center with Dell and AMD
Mobile App Security Testing_ A Comprehensive Guide.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx

Betabot