SlideShare a Scribd company logo
1 of 36
Download to read offline
Normalizing Empire's Traffic to
Evade Anomaly-Based IDS
Utku Sen - Gözde Sinturk
Whoami
• Working @ Tear Security

• utkusen.com

• twitter.com/utkusen
Outline
• Current state of defense and assume breach scenarios

• Signature/Anomaly based NIDS and evasion

• A brief information about Empire project

• Anomaly based NIDS and Empire

• Proposed solutions

• firstorder tool
A Basic Network
Perimeter Defenses (Firewall)
NIDS (Network Intrusion Detection System)
Clients
Some Other Assets
A Basic Network
Assume Breach
NIDS (Network Intrusion Detection System)
Signature-Based Anomaly-Based
Signature-based NIDS
• Looks for pre-defined patterns
of previously known attacks.

• Doesn’t require a training
phase.

• Highly available and popular.

• Can’t catch zero-day/new
attacks.
Evasion
• Not complex but not super easy.

• Change traffic elements.

• Don’t match with any signatures.
Anomaly based NIDS
• Builds a statistical model
describing the normal network
traffic, and flagging the
abnormal traffic.

• Requires training phase.

• Uses math, machine-learning
and various sophisticated
thing.

• Expensive $$

• Might catch zero-day/new
attacks.
Anomaly based NIDS
Recorded Daily Traffic
-HTTP - vice.com/ai-hackers-coming-in-2022.html
-SMTP - mail.acme.com/ Subject: Meeting notes
-HTTPS - youtube.com / (8 hours active traffic)
-SSH - development.acme.com
LEARNING
ALGORITHM
PATTERN (NORMAL
TRAFFIC PROFILE)
POST /read.php HTTP/1.1
Cookie: session=VAGyTO1KBPO0BxJ45BZrcm3BinQ
{‘Utku Sen’:’122-124-12424’}
New Traffic
NORMAL ANORMAL
Evasion
Pre-training Post-training
Pre-Training Evasion
• Generate malicious traffic on the network.

• Algorithm will accept it as regular network traffic.
I visit amazon.com I connect dev.acme.com via SSH I use Meterpreter reverse tcp
Regular
Network Traffic
TRAINING ENGINE
–Anyone
“It’s not realistic.”
A Realistic Scenario?
• Anomaly-detection engine is trained by -real- regular traffic.

• Watches the whole network.

• Attacker should gain a foothold on the network and
exfiltrate data without causing any anomaly alert.
Empire
AgentListener (C&C Server)
Command
Output
Key Traits of HTTP Listener
• KillDate: Date for the listener to exit

• DefaultDelay: Agent delay/reach back interval

• WorkingHours: Hours for the agent to operate

• DefaultProfile: User-agent value and URI specification for the agent

• DefaultJitter: Jitter in agent reachback interval

• Port: Listening port of the C2 server

• StagingKey: Staging key for initial agent negotiation

• ServerVersion: Server header for the C2 server.
C2-Agent Communication
• ”Client Data” is symmetrically encrypted with AES
algorithm where encryption key is client’s session key.

• ”Metadata/Routing Data” is symmetrically encrypted with
RC4 algorithm where encryption key is ”StagingKey” of
the listener.
Command:whoami *+1kJas82=½$5
Response:root/%^’Aj8&a=283.
NIDS on Empire’s HTTP Listener
• Request URI

• User-agent value

• Server header

• Default HTML Content

• Port

• Connection Interval
(DefaultDelay)
NIDS on Empire’s HTTP Listener
• Post Request Body
Traits
Can be Changed in Options Menu Requires Source Code Change
- Request URI

- User-agent value

- Server header

- Port

- Connection interval
- Default HTML content

- POST request body
Proposed Solution
• Polymorphic Blending Attack (PBA): Creating attack
packets which are matches to normal traffic profile
PATTERN (NORMAL
TRAFFIC PROFILE)
Network Packet
NORMAL ANORMAL
Attacker
I have to learn
what is considered
as normal
Let’s capture
the traffic and
check what’s inside
Steps For The First Group of Traits
• Get traffic capture data of a normal traffic and define
normal behaviour of users. (Request URI, User-agent, Server header, Port)

• Change Empire’s listener traits according to first step.

• Start the C2-agent communication.
Adjusting The Connection Interval
• False-positive rate of an anomaly detection system has a
positive correlation with the size of the network.

• More computers = less connection interval

• Less computers = more connection interval

• More connection interval is better in most cases.
Steps For The Second Group of Traits
• Get traffic capture data of a normal traffic and define
normal behaviour of users. (Default HTML Content)

• Change Empire’s listener traits according to first step.

• Start the C2-agent communication.
Post Request Body
Command:whoami *+1kJas82=½$5
Response:root/%^’Aj8&a=283.
ENCRYPTED
Command:whoami
Response:root
Plain Text
Real Sh*t? I sleep
Real Sh*t? Real Sh*t?
Anomaly-based Signature-based
Markov Obfuscation
• Published by Cylance SPEAR Team (https://github.com/CylanceSPEAR/
MarkovObfuscate)
TRAINING DATA
(BOOK) MODEL
A STRING
MARKOV ENCODE
ALGORITHM
AN ENGLISH TEXT
Operation Steps
• Encode Empire’s encrypted data with Base64 to get rid of non-
printable characters.

• Download the dataset from an external source.

• Train the encoded data with dataset.

• Send Markov encoded data with dataset to C2 server.
Local Network
Anomaly Based IDS
Attacker
dailynews.com
Get lots of English texts
I sleep
encoded payload+datasetencoded payload+dataset
Drawbacks
• Data training will consume time and resource.

• You need to implement the Markov Obfuscation code
inside the agent.
firstorder Tool
• Extracts valuable information from a PCAP file and
configures Empire’s listener.

• Most used ports, URI, server headers, user-agents,
number of machines etc.

• Configures Empire’s listener automatically.
github.com/tearsecurity/firstorder
Conclusions
• Defense mechanisms are getting smarter.

• Attackers should create smarter methods which can
mislead an AI.

More Related Content

What's hot

Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkEC-Council
 
Sullivan handshake proxying-ieee-sp_2014
Sullivan handshake proxying-ieee-sp_2014Sullivan handshake proxying-ieee-sp_2014
Sullivan handshake proxying-ieee-sp_2014Cloudflare
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysJoff Thyer
 
Heartbleed Overview
Heartbleed OverviewHeartbleed Overview
Heartbleed OverviewSensePost
 
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-mainDefcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-mainPriyanka Aash
 
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE  Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE Dragos, Inc.
 
Fuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox TestingFuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox TestingNetSPI
 
Network Forensics and Practical Packet Analysis
Network Forensics and Practical Packet AnalysisNetwork Forensics and Practical Packet Analysis
Network Forensics and Practical Packet AnalysisPriyanka Aash
 
The state of wireless security
The state of wireless security The state of wireless security
The state of wireless security Filip Waeytens
 
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slapDEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slapFelipe Prado
 
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...EC-Council
 
Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014chrissanders88
 
Offence oriented Defence
Offence oriented DefenceOffence oriented Defence
Offence oriented DefenceSensePost
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network EvidenceCNIT 152: 9 Network Evidence
CNIT 152: 9 Network EvidenceSam Bowne
 
Rat a-tat-tat
Rat a-tat-tatRat a-tat-tat
Rat a-tat-tatSensePost
 
Prowler: BlackHat Europe Arsenal 2018
Prowler: BlackHat Europe Arsenal 2018Prowler: BlackHat Europe Arsenal 2018
Prowler: BlackHat Europe Arsenal 2018Toni de la Fuente
 
CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman	CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman Sam Bowne
 
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat Security Conference
 
Practical White Hat Hacker Training - Vulnerability Detection
Practical White Hat Hacker Training - Vulnerability DetectionPractical White Hat Hacker Training - Vulnerability Detection
Practical White Hat Hacker Training - Vulnerability DetectionPRISMA CSI
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceSam Bowne
 

What's hot (20)

Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Sullivan handshake proxying-ieee-sp_2014
Sullivan handshake proxying-ieee-sp_2014Sullivan handshake proxying-ieee-sp_2014
Sullivan handshake proxying-ieee-sp_2014
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 
Heartbleed Overview
Heartbleed OverviewHeartbleed Overview
Heartbleed Overview
 
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-mainDefcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
 
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE  Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE
Anatomy of an Attack: Detecting and Defeating CRASHOVERRIDE
 
Fuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox TestingFuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox Testing
 
Network Forensics and Practical Packet Analysis
Network Forensics and Practical Packet AnalysisNetwork Forensics and Practical Packet Analysis
Network Forensics and Practical Packet Analysis
 
The state of wireless security
The state of wireless security The state of wireless security
The state of wireless security
 
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slapDEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
 
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
 
Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014
 
Offence oriented Defence
Offence oriented DefenceOffence oriented Defence
Offence oriented Defence
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network EvidenceCNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
Rat a-tat-tat
Rat a-tat-tatRat a-tat-tat
Rat a-tat-tat
 
Prowler: BlackHat Europe Arsenal 2018
Prowler: BlackHat Europe Arsenal 2018Prowler: BlackHat Europe Arsenal 2018
Prowler: BlackHat Europe Arsenal 2018
 
CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman	CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman
 
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
 
Practical White Hat Hacker Training - Vulnerability Detection
Practical White Hat Hacker Training - Vulnerability DetectionPractical White Hat Hacker Training - Vulnerability Detection
Practical White Hat Hacker Training - Vulnerability Detection
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network Evidence
 

Similar to Normalizing Empire's Traffic to Evade Anomaly-Based IDS

«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NETAlessandro Giorgetti
 
Penetration Testing Services Technical Description Cyber51
Penetration Testing Services Technical Description Cyber51Penetration Testing Services Technical Description Cyber51
Penetration Testing Services Technical Description Cyber51martinvoelk
 
Capacity Planning for fun & profit
Capacity Planning for fun & profitCapacity Planning for fun & profit
Capacity Planning for fun & profitRodrigo Campos
 
Thick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxThick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxAnurag Srivastava
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence Sam Bowne
 
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationWebinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationDeepak Shankar
 
Controlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and DataControlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and DataPrecisely
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterJohn Adams
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitterRoger Xia
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...smallerror
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...xlight
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
chapter-4-networking hjgjjgj did hfhhfhj
chapter-4-networking hjgjjgj did hfhhfhjchapter-4-networking hjgjjgj did hfhhfhj
chapter-4-networking hjgjjgj did hfhhfhjAmitDeshai
 

Similar to Normalizing Empire's Traffic to Evade Anomaly-Based IDS (20)

Coporate Espionage
Coporate EspionageCoporate Espionage
Coporate Espionage
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
 
Penetration Testing Services Technical Description Cyber51
Penetration Testing Services Technical Description Cyber51Penetration Testing Services Technical Description Cyber51
Penetration Testing Services Technical Description Cyber51
 
Capacity Planning for fun & profit
Capacity Planning for fun & profitCapacity Planning for fun & profit
Capacity Planning for fun & profit
 
Thick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptxThick client pentesting_the-hackers_meetup_version1.0pptx
Thick client pentesting_the-hackers_meetup_version1.0pptx
 
WEEK-01.pdf
WEEK-01.pdfWEEK-01.pdf
WEEK-01.pdf
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationWebinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
 
Controlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and DataControlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and Data
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Java socket programming
Java socket programmingJava socket programming
Java socket programming
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
Software Security and IDS.pptx
Software Security and IDS.pptxSoftware Security and IDS.pptx
Software Security and IDS.pptx
 
Ccna sec 01
Ccna sec 01Ccna sec 01
Ccna sec 01
 
chapter-4-networking hjgjjgj did hfhhfhj
chapter-4-networking hjgjjgj did hfhhfhjchapter-4-networking hjgjjgj did hfhhfhj
chapter-4-networking hjgjjgj did hfhhfhj
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Normalizing Empire's Traffic to Evade Anomaly-Based IDS

  • 1. Normalizing Empire's Traffic to Evade Anomaly-Based IDS Utku Sen - Gözde Sinturk
  • 2. Whoami • Working @ Tear Security • utkusen.com • twitter.com/utkusen
  • 3. Outline • Current state of defense and assume breach scenarios • Signature/Anomaly based NIDS and evasion • A brief information about Empire project • Anomaly based NIDS and Empire • Proposed solutions • firstorder tool
  • 4. A Basic Network Perimeter Defenses (Firewall) NIDS (Network Intrusion Detection System) Clients Some Other Assets
  • 7. NIDS (Network Intrusion Detection System) Signature-Based Anomaly-Based
  • 8. Signature-based NIDS • Looks for pre-defined patterns of previously known attacks. • Doesn’t require a training phase. • Highly available and popular. • Can’t catch zero-day/new attacks.
  • 9. Evasion • Not complex but not super easy. • Change traffic elements. • Don’t match with any signatures.
  • 10. Anomaly based NIDS • Builds a statistical model describing the normal network traffic, and flagging the abnormal traffic. • Requires training phase. • Uses math, machine-learning and various sophisticated thing. • Expensive $$ • Might catch zero-day/new attacks.
  • 11. Anomaly based NIDS Recorded Daily Traffic -HTTP - vice.com/ai-hackers-coming-in-2022.html -SMTP - mail.acme.com/ Subject: Meeting notes -HTTPS - youtube.com / (8 hours active traffic) -SSH - development.acme.com LEARNING ALGORITHM PATTERN (NORMAL TRAFFIC PROFILE) POST /read.php HTTP/1.1 Cookie: session=VAGyTO1KBPO0BxJ45BZrcm3BinQ {‘Utku Sen’:’122-124-12424’} New Traffic NORMAL ANORMAL
  • 13. Pre-Training Evasion • Generate malicious traffic on the network. • Algorithm will accept it as regular network traffic. I visit amazon.com I connect dev.acme.com via SSH I use Meterpreter reverse tcp Regular Network Traffic TRAINING ENGINE
  • 15. A Realistic Scenario? • Anomaly-detection engine is trained by -real- regular traffic. • Watches the whole network. • Attacker should gain a foothold on the network and exfiltrate data without causing any anomaly alert.
  • 17. Key Traits of HTTP Listener • KillDate: Date for the listener to exit • DefaultDelay: Agent delay/reach back interval • WorkingHours: Hours for the agent to operate • DefaultProfile: User-agent value and URI specification for the agent • DefaultJitter: Jitter in agent reachback interval • Port: Listening port of the C2 server • StagingKey: Staging key for initial agent negotiation • ServerVersion: Server header for the C2 server.
  • 18. C2-Agent Communication • ”Client Data” is symmetrically encrypted with AES algorithm where encryption key is client’s session key. • ”Metadata/Routing Data” is symmetrically encrypted with RC4 algorithm where encryption key is ”StagingKey” of the listener. Command:whoami *+1kJas82=½$5 Response:root/%^’Aj8&a=283.
  • 19. NIDS on Empire’s HTTP Listener • Request URI • User-agent value • Server header • Default HTML Content • Port • Connection Interval (DefaultDelay)
  • 20. NIDS on Empire’s HTTP Listener • Post Request Body
  • 21. Traits Can be Changed in Options Menu Requires Source Code Change - Request URI - User-agent value - Server header - Port - Connection interval - Default HTML content - POST request body
  • 22. Proposed Solution • Polymorphic Blending Attack (PBA): Creating attack packets which are matches to normal traffic profile PATTERN (NORMAL TRAFFIC PROFILE) Network Packet NORMAL ANORMAL Attacker I have to learn what is considered as normal Let’s capture the traffic and check what’s inside
  • 23. Steps For The First Group of Traits • Get traffic capture data of a normal traffic and define normal behaviour of users. (Request URI, User-agent, Server header, Port) • Change Empire’s listener traits according to first step. • Start the C2-agent communication.
  • 24. Adjusting The Connection Interval • False-positive rate of an anomaly detection system has a positive correlation with the size of the network. • More computers = less connection interval • Less computers = more connection interval • More connection interval is better in most cases.
  • 25. Steps For The Second Group of Traits • Get traffic capture data of a normal traffic and define normal behaviour of users. (Default HTML Content) • Change Empire’s listener traits according to first step. • Start the C2-agent communication.
  • 26. Post Request Body Command:whoami *+1kJas82=½$5 Response:root/%^’Aj8&a=283. ENCRYPTED Command:whoami Response:root Plain Text Real Sh*t? I sleep Real Sh*t? Real Sh*t? Anomaly-based Signature-based
  • 27. Markov Obfuscation • Published by Cylance SPEAR Team (https://github.com/CylanceSPEAR/ MarkovObfuscate) TRAINING DATA (BOOK) MODEL A STRING MARKOV ENCODE ALGORITHM AN ENGLISH TEXT
  • 28.
  • 29.
  • 30. Operation Steps • Encode Empire’s encrypted data with Base64 to get rid of non- printable characters. • Download the dataset from an external source. • Train the encoded data with dataset. • Send Markov encoded data with dataset to C2 server.
  • 31. Local Network Anomaly Based IDS Attacker dailynews.com Get lots of English texts I sleep encoded payload+datasetencoded payload+dataset
  • 32. Drawbacks • Data training will consume time and resource. • You need to implement the Markov Obfuscation code inside the agent.
  • 33. firstorder Tool • Extracts valuable information from a PCAP file and configures Empire’s listener. • Most used ports, URI, server headers, user-agents, number of machines etc. • Configures Empire’s listener automatically.
  • 34.
  • 36. Conclusions • Defense mechanisms are getting smarter. • Attackers should create smarter methods which can mislead an AI.