SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
   
 
Security Sessions 2016 Workshop 
Getting your hands dirty: How to Analyze the 
Behavior of Malware Traffic 
 
1. Introduction 
● About the teacher and attendants 
● Intro to what is this workshop about. 
○ It is not about tools 
○ It Is about learning to analyze malware traffic and to separate it from normal 
traffic. 
● Start of notebooks with Kali, connection to Internet. 
● What is an attack? What is the difference with normal? 
● What is Malware? What is a botnet? 
2. How network protocols work. A baseline reminder 
● Current knowledge about networking? 
● Network protocols, TCP/IP layers, how do they work? 
● Horizontal and vertical communication 
● Basic protocols. What are they for? Which ports do they use? 
○ Ethernet, ARP, ICMP, IP, TCP, UDP, HTTP, DNS, SSH, SSL/TLS 
3. Analysing network traffic, learning what to see. 
● Wireshark 
○ Start wireshark and capture some of your traffic.  
○ Identify the hosts, ports and protocols used.  
○ See the different layers of protocols and encapsulations.  
○ Identify an HTTP connection, see its content. 
■ Follow a TCP stream 
○ See a HTTPs connection. 
○ Advanced wireshark:  
■ filters 
■ IO graphic 
■ expert info 
● Tcpdump 
○ Use tcpdump to see information from your network 
■ tcpdump ­n ­s0 ­i eth0  
○ Use filters for tcpdump 
■ host, port, ands and ors 
○ Use ­A to see the ASCII text inside packets. 
○ Use ­tttt to see a more useful timestamp. 
○ Read packets 
■ ­r output.pcap 
○ Search with less (/) 
■ Web connections: 
1. GET|POST|Host: 
● A little bit about reputation of IPs 
○ This is actually more complex, but we can start with VirusTotal 
■ https://www.virustotal.com/ 
■ Search for IPs, domains or URLs 
■ See if you can infer something about the reputation of: 
1. 89.108.101.61 
2. 95.163.121.33 
3. 93.184.220.29 
4. 13.107.4.50 
■ For domains, better www.passive­total.com 
● Analysis of capture3.pcap.bz2 
○ Download from : 
https://mega.nz/#!MkpgjTIR!_IIOQ4ra2CGh9JkZYfhkhwCCDJWy3IPIenkrlV5
AWqA 
○ Uncompress it 
■ bzip2 ­d file3.pcap.bz2 
○ What can you say about it?? Malware or normal? 
○ Some graphs with ​CapTipper​ tool 
■ https://mcfp.felk.cvut.cz/publicDatasets/CTU­Malware­Capture­Botnet­
66­1/2014­04­07_capture­win13.short.html 
● Analysis of capture2.pcap.bz2 
○ Goal: To analyze this file and conclude if the host was infected or not. 
○ Download form: 
https://mega.nz/#!p4xViQ7J!wenCMFUOPGLlfk5rKNcqCNan1rojY5myHjoc0c
R3KV8 
○ What can you say about it?? malware or normal? 
● Analysis of file1.small.pcap 
○ Goal: To analyze this file and conclude if the host was infected or not. 
○ Download from 
https://mega.nz/#!J4oyyYTB!_L5I5IAti­d3YQ0ZT0MBnbKanB2qw3ZMh_t1qG
YiL5Q  
○ What can you say about it?? is it malware or normal? 
■ My conclusions: 
1. The mac address of the machine is VirtualBox 
2. Initial web connection without DNS. 
3. Web connection with referer, but no previous web connection 
done. Fake referer. 
4. POST of a video? Without cookies? mp4 should have an ID3 
header that is not there, so probably the content is not mp4. 
5. The content of the POST looks strange. Like a substitution 
cipher. 
6. The reputation of 95.163.121.33 (and other IPs) is very bad 
and tied to Dridex malware 
7. Further POSTs are suspicious (long and without readable 
data) with Host headers having a fake host names (looks like 
DGA) and fake referrers again. Is it transmitting data on the 
Host header? (like ZeroAccess?) 
8. Only with Wireshark: The time difference between HTTP 
connections is too short. Not a manual interaction. 
9. Only with Wireshark: The graph shows a very suspicious 
periodicity on the TCP web connections. 
10. The Host header name: “5t9AR us” has a space! this is 
forbidden in the standard. 
11. You can also see that the same IP is used by several dozen 
hosts and requested by one source IP very quickly. 
Suspicious.   
12. Seems malware 
13. Actually is Dridex 
● Other useful tools we are not covering too much 
○ tshark: command line wireshark 
■ tshark ­r file.pcap ­n ­Tfields ­e ip.src (example for getting the src ip in 
the packets only) 
4. Attacking each other and discovering the traffic 
Goal: To attack others and get access, to recognize who is attacking you and to report it by 
email. 
 
● Start capturing traffic in your host using tcpdump 
○ Goal: To know what happens in the network with the SSH protocol (port 22) 
○ tcpdump ­n ­s0 ­i eth0 ­v ­w /root/malware­nights­class­1­ssh­attack.pcap 
● Download this list of passwords 
○ wget 
https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords
/best15.txt 
● Change your root password  
○ As root 
■ passwd (and put a good password) 
● Create another user (unprivileged). The name of the user is test 
■ useradd test 
● Start the SSH service 
○ /etc/init.d/ssh restart 
● Change the password of the test user 
○ First get one password randomly from the file. 
■ N=`shuf ­i 1­15 ­n 1`; head ­n $N best15.txt |tail ­n 1 
○ Then change it with the command (put it twice): 
■ passwd test 
● Put here the password printed by the previous command. 
● Find other hosts in the network with the SSH port open 
○ nmap ­sS ­p 22 ­n ­v <your­ip­address>/24 ­oN ssh­servers.txt 
● Bruteforce the SSH password of the active hosts 
○ Medusa tool 
■ hydra ­s 22 ­l test ­P best15.txt <IP­to­crack> ssh 
● Analysis of the traffic 
○ Analyze your capture file 
○ If somebody found the password of your computer or not. And how do you 
know. 
○ Bonus question: Did they access your computer and type commands on it? 
How do you know? 
 

Contenu connexe

Tendances (10)

Tor
TorTor
Tor
 
Tor Pivoting Networks Share
Tor Pivoting Networks Share Tor Pivoting Networks Share
Tor Pivoting Networks Share
 
Darknets - Introduction & Deanonymization of Tor Users By Hitesh Bhatia
Darknets - Introduction &  Deanonymization of Tor Users By Hitesh BhatiaDarknets - Introduction &  Deanonymization of Tor Users By Hitesh Bhatia
Darknets - Introduction & Deanonymization of Tor Users By Hitesh Bhatia
 
TOR... ALL THE THINGS
TOR... ALL THE THINGSTOR... ALL THE THINGS
TOR... ALL THE THINGS
 
Anonymous Security Scanning and Browsing
Anonymous Security Scanning and BrowsingAnonymous Security Scanning and Browsing
Anonymous Security Scanning and Browsing
 
How TOR works?
How TOR works?How TOR works?
How TOR works?
 
Tor
TorTor
Tor
 
Neutron packet logging framework
Neutron packet logging frameworkNeutron packet logging framework
Neutron packet logging framework
 
Tor Network
Tor NetworkTor Network
Tor Network
 
Week14_Web_Presentation
Week14_Web_PresentationWeek14_Web_Presentation
Week14_Web_Presentation
 

Similaire à Getting your hands dirty: How to Analyze the Behavior of Malware Traffic / SEBASTIAN GARCIA [ATG GROUP OF CTU]

Network traffic analysis with cyber security
Network traffic analysis with cyber securityNetwork traffic analysis with cyber security
Network traffic analysis with cyber securityKAMALI PRIYA P
 
Network Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdfNetwork Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdftalkaton
 
Network Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptxNetwork Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptxtalkaton
 
Prensentation on packet sniffer and injection tool
Prensentation on packet sniffer and injection toolPrensentation on packet sniffer and injection tool
Prensentation on packet sniffer and injection toolIssar Kapadia
 
Onion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and AnonymityOnion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and Anonymityanurag singh
 
Virtual Labs SniffingConsider what you have learned so far
Virtual Labs SniffingConsider what you have learned so far Virtual Labs SniffingConsider what you have learned so far
Virtual Labs SniffingConsider what you have learned so far AlleneMcclendon878
 
BSIT3CD_Continuation of Cyber incident response (1).pdf
BSIT3CD_Continuation of Cyber incident response (1).pdfBSIT3CD_Continuation of Cyber incident response (1).pdf
BSIT3CD_Continuation of Cyber incident response (1).pdfStevenJoeBiago
 
Noorbehbahani data preprocessing for anomaly based network intrusion
Noorbehbahani data preprocessing for anomaly based network intrusionNoorbehbahani data preprocessing for anomaly based network intrusion
Noorbehbahani data preprocessing for anomaly based network intrusionnoorbehbahani
 
[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security IXatierlike Lee
 
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...JosephTesta9
 
How Network Management Systems
How Network Management SystemsHow Network Management Systems
How Network Management SystemsTomoko Nishiuchi
 
Encryption and decryption in TOR
Encryption and decryption in TOREncryption and decryption in TOR
Encryption and decryption in TORanjalika sinha
 
infoAssurance (1).pptx
infoAssurance (1).pptxinfoAssurance (1).pptx
infoAssurance (1).pptxStevenJoeBiago
 
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...2014.7.9 detecting p2 p botnets through network behavior analysis and machine...
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...ericsuboy
 
ICMP protocol , TCP IP , computer network and security.pptx
ICMP protocol , TCP IP , computer network and security.pptxICMP protocol , TCP IP , computer network and security.pptx
ICMP protocol , TCP IP , computer network and security.pptxlivaunnoor
 

Similaire à Getting your hands dirty: How to Analyze the Behavior of Malware Traffic / SEBASTIAN GARCIA [ATG GROUP OF CTU] (20)

Network traffic analysis with cyber security
Network traffic analysis with cyber securityNetwork traffic analysis with cyber security
Network traffic analysis with cyber security
 
Network Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdfNetwork Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdf
 
Network Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptxNetwork Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptx
 
Prensentation on packet sniffer and injection tool
Prensentation on packet sniffer and injection toolPrensentation on packet sniffer and injection tool
Prensentation on packet sniffer and injection tool
 
Onion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and AnonymityOnion routing and tor: Fundamentals and Anonymity
Onion routing and tor: Fundamentals and Anonymity
 
Tcpdump hunter
Tcpdump hunterTcpdump hunter
Tcpdump hunter
 
Packet sniffers
Packet sniffers Packet sniffers
Packet sniffers
 
Virtual Labs SniffingConsider what you have learned so far
Virtual Labs SniffingConsider what you have learned so far Virtual Labs SniffingConsider what you have learned so far
Virtual Labs SniffingConsider what you have learned so far
 
BSIT3CD_Continuation of Cyber incident response (1).pdf
BSIT3CD_Continuation of Cyber incident response (1).pdfBSIT3CD_Continuation of Cyber incident response (1).pdf
BSIT3CD_Continuation of Cyber incident response (1).pdf
 
Noorbehbahani data preprocessing for anomaly based network intrusion
Noorbehbahani data preprocessing for anomaly based network intrusionNoorbehbahani data preprocessing for anomaly based network intrusion
Noorbehbahani data preprocessing for anomaly based network intrusion
 
[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I[NCTU] [CCCA] Network Security I
[NCTU] [CCCA] Network Security I
 
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...
BSides Rochester 2018: Jonathan Myers: IoT Malware Detection with Machine Lea...
 
How Network Management Systems
How Network Management SystemsHow Network Management Systems
How Network Management Systems
 
Nmap
NmapNmap
Nmap
 
Encryption and decryption in TOR
Encryption and decryption in TOREncryption and decryption in TOR
Encryption and decryption in TOR
 
Linux and firewall
Linux and firewallLinux and firewall
Linux and firewall
 
infoAssurance (1).pptx
infoAssurance (1).pptxinfoAssurance (1).pptx
infoAssurance (1).pptx
 
Snort
SnortSnort
Snort
 
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...2014.7.9 detecting p2 p botnets through network behavior analysis and machine...
2014.7.9 detecting p2 p botnets through network behavior analysis and machine...
 
ICMP protocol , TCP IP , computer network and security.pptx
ICMP protocol , TCP IP , computer network and security.pptxICMP protocol , TCP IP , computer network and security.pptx
ICMP protocol , TCP IP , computer network and security.pptx
 

Plus de Security Session

Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...
Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...
Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...Security Session
 
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...Security Session
 
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]Security Session
 
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]Security Session
 
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...Security Session
 
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Security Session
 
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]Security Session
 
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...Security Session
 
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]Security Session
 
Exploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýExploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýSecurity Session
 
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin Dráb
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin DrábKontrola uživatelských účtů ve Windows a jak ji obejít - Martin Dráb
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin DrábSecurity Session
 
Research in Liveness Detection - Martin Drahanský
Research in Liveness Detection - Martin DrahanskýResearch in Liveness Detection - Martin Drahanský
Research in Liveness Detection - Martin DrahanskýSecurity Session
 
Dolování dat z řeči pro bezpečnostní aplikace - Jan Černocký
Dolování dat z řeči pro bezpečnostní aplikace - Jan ČernockýDolování dat z řeči pro bezpečnostní aplikace - Jan Černocký
Dolování dat z řeči pro bezpečnostní aplikace - Jan ČernockýSecurity Session
 
Co se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkCo se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkSecurity Session
 
Jak odesílat zprávy, když někdo vypne Internet - Pavel Táborský
Jak odesílat zprávy, když někdo vypne Internet - 	Pavel TáborskýJak odesílat zprávy, když někdo vypne Internet - 	Pavel Táborský
Jak odesílat zprávy, když někdo vypne Internet - Pavel TáborskýSecurity Session
 
Two Years with botnet Asprox - Michal Ambrož
Two Years with botnet Asprox - Michal AmbrožTwo Years with botnet Asprox - Michal Ambrož
Two Years with botnet Asprox - Michal AmbrožSecurity Session
 
Falsifikace biometricke charakteristiky a detekce zivosti
Falsifikace biometricke charakteristiky a detekce zivostiFalsifikace biometricke charakteristiky a detekce zivosti
Falsifikace biometricke charakteristiky a detekce zivostiSecurity Session
 

Plus de Security Session (20)

Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...
Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...
Základy reverse engineeringu a assembleru / KAREL LEJSKA, MILAN BARTOŠ [DEFEN...
 
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...
Zabezpečení nejen SSH na serveru pomocí Fail2Ban a jednoduchého honeypotu. / ...
 
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]
Insights of a brute-forcing botnet / VERONICA VALEROS [CISCO]
 
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]
Softwarove protektory / KAREL LEJSKA, MILAN BARTOŠ [DEFENDIO]
 
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...
Wintel Hell: průvodce devíti kruhy Dantova technologického pekla / MARTIN HRO...
 
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
Robots against robots: How a Machine Learning IDS detected a novel Linux Botn...
 
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]
#ochranadat pred sebou samotným / MATEJ ZACHAR [SAFETICA TECHNOLOGIES S.R.O.]
 
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...
Co vše skrývá síťový provoz a jak detekovat kybernetické hrozby? / MARTIN ŠKO...
 
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]
Bezpečnější pošta díky protokolu DANE / ONDŘEJ CALETKA [CESNET]
 
Prezentace brno
Prezentace brnoPrezentace brno
Prezentace brno
 
OSINT and beyond
OSINT and beyondOSINT and beyond
OSINT and beyond
 
Exploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýExploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan Kopecký
 
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin Dráb
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin DrábKontrola uživatelských účtů ve Windows a jak ji obejít - Martin Dráb
Kontrola uživatelských účtů ve Windows a jak ji obejít - Martin Dráb
 
Research in Liveness Detection - Martin Drahanský
Research in Liveness Detection - Martin DrahanskýResearch in Liveness Detection - Martin Drahanský
Research in Liveness Detection - Martin Drahanský
 
Dolování dat z řeči pro bezpečnostní aplikace - Jan Černocký
Dolování dat z řeči pro bezpečnostní aplikace - Jan ČernockýDolování dat z řeči pro bezpečnostní aplikace - Jan Černocký
Dolování dat z řeči pro bezpečnostní aplikace - Jan Černocký
 
Turris - Robert Šefr
Turris - Robert ŠefrTurris - Robert Šefr
Turris - Robert Šefr
 
Co se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel MinaříkCo se skrývá v datovém provozu? - Pavel Minařík
Co se skrývá v datovém provozu? - Pavel Minařík
 
Jak odesílat zprávy, když někdo vypne Internet - Pavel Táborský
Jak odesílat zprávy, když někdo vypne Internet - 	Pavel TáborskýJak odesílat zprávy, když někdo vypne Internet - 	Pavel Táborský
Jak odesílat zprávy, když někdo vypne Internet - Pavel Táborský
 
Two Years with botnet Asprox - Michal Ambrož
Two Years with botnet Asprox - Michal AmbrožTwo Years with botnet Asprox - Michal Ambrož
Two Years with botnet Asprox - Michal Ambrož
 
Falsifikace biometricke charakteristiky a detekce zivosti
Falsifikace biometricke charakteristiky a detekce zivostiFalsifikace biometricke charakteristiky a detekce zivosti
Falsifikace biometricke charakteristiky a detekce zivosti
 

Dernier

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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Dernier (20)

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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Getting your hands dirty: How to Analyze the Behavior of Malware Traffic / SEBASTIAN GARCIA [ATG GROUP OF CTU]

  • 1.       Security Sessions 2016 Workshop  Getting your hands dirty: How to Analyze the  Behavior of Malware Traffic    1. Introduction  ● About the teacher and attendants  ● Intro to what is this workshop about.  ○ It is not about tools  ○ It Is about learning to analyze malware traffic and to separate it from normal  traffic.  ● Start of notebooks with Kali, connection to Internet.  ● What is an attack? What is the difference with normal?  ● What is Malware? What is a botnet?  2. How network protocols work. A baseline reminder  ● Current knowledge about networking?  ● Network protocols, TCP/IP layers, how do they work?  ● Horizontal and vertical communication  ● Basic protocols. What are they for? Which ports do they use?  ○ Ethernet, ARP, ICMP, IP, TCP, UDP, HTTP, DNS, SSH, SSL/TLS  3. Analysing network traffic, learning what to see.  ● Wireshark  ○ Start wireshark and capture some of your traffic.   ○ Identify the hosts, ports and protocols used.   ○ See the different layers of protocols and encapsulations.   ○ Identify an HTTP connection, see its content.  ■ Follow a TCP stream  ○ See a HTTPs connection. 
  • 2. ○ Advanced wireshark:   ■ filters  ■ IO graphic  ■ expert info  ● Tcpdump  ○ Use tcpdump to see information from your network  ■ tcpdump ­n ­s0 ­i eth0   ○ Use filters for tcpdump  ■ host, port, ands and ors  ○ Use ­A to see the ASCII text inside packets.  ○ Use ­tttt to see a more useful timestamp.  ○ Read packets  ■ ­r output.pcap  ○ Search with less (/)  ■ Web connections:  1. GET|POST|Host:  ● A little bit about reputation of IPs  ○ This is actually more complex, but we can start with VirusTotal  ■ https://www.virustotal.com/  ■ Search for IPs, domains or URLs  ■ See if you can infer something about the reputation of:  1. 89.108.101.61  2. 95.163.121.33  3. 93.184.220.29  4. 13.107.4.50  ■ For domains, better www.passive­total.com  ● Analysis of capture3.pcap.bz2  ○ Download from :  https://mega.nz/#!MkpgjTIR!_IIOQ4ra2CGh9JkZYfhkhwCCDJWy3IPIenkrlV5 AWqA  ○ Uncompress it  ■ bzip2 ­d file3.pcap.bz2  ○ What can you say about it?? Malware or normal?  ○ Some graphs with ​CapTipper​ tool  ■ https://mcfp.felk.cvut.cz/publicDatasets/CTU­Malware­Capture­Botnet­ 66­1/2014­04­07_capture­win13.short.html  ● Analysis of capture2.pcap.bz2  ○ Goal: To analyze this file and conclude if the host was infected or not.  ○ Download form:  https://mega.nz/#!p4xViQ7J!wenCMFUOPGLlfk5rKNcqCNan1rojY5myHjoc0c R3KV8  ○ What can you say about it?? malware or normal?  ● Analysis of file1.small.pcap  ○ Goal: To analyze this file and conclude if the host was infected or not. 
  • 3. ○ Download from  https://mega.nz/#!J4oyyYTB!_L5I5IAti­d3YQ0ZT0MBnbKanB2qw3ZMh_t1qG YiL5Q   ○ What can you say about it?? is it malware or normal?  ■ My conclusions:  1. The mac address of the machine is VirtualBox  2. Initial web connection without DNS.  3. Web connection with referer, but no previous web connection  done. Fake referer.  4. POST of a video? Without cookies? mp4 should have an ID3  header that is not there, so probably the content is not mp4.  5. The content of the POST looks strange. Like a substitution  cipher.  6. The reputation of 95.163.121.33 (and other IPs) is very bad  and tied to Dridex malware  7. Further POSTs are suspicious (long and without readable  data) with Host headers having a fake host names (looks like  DGA) and fake referrers again. Is it transmitting data on the  Host header? (like ZeroAccess?)  8. Only with Wireshark: The time difference between HTTP  connections is too short. Not a manual interaction.  9. Only with Wireshark: The graph shows a very suspicious  periodicity on the TCP web connections.  10. The Host header name: “5t9AR us” has a space! this is  forbidden in the standard.  11. You can also see that the same IP is used by several dozen  hosts and requested by one source IP very quickly.  Suspicious.    12. Seems malware  13. Actually is Dridex  ● Other useful tools we are not covering too much  ○ tshark: command line wireshark  ■ tshark ­r file.pcap ­n ­Tfields ­e ip.src (example for getting the src ip in  the packets only)  4. Attacking each other and discovering the traffic  Goal: To attack others and get access, to recognize who is attacking you and to report it by  email.    ● Start capturing traffic in your host using tcpdump  ○ Goal: To know what happens in the network with the SSH protocol (port 22)  ○ tcpdump ­n ­s0 ­i eth0 ­v ­w /root/malware­nights­class­1­ssh­attack.pcap  ● Download this list of passwords 
  • 4. ○ wget  https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords /best15.txt  ● Change your root password   ○ As root  ■ passwd (and put a good password)  ● Create another user (unprivileged). The name of the user is test  ■ useradd test  ● Start the SSH service  ○ /etc/init.d/ssh restart  ● Change the password of the test user  ○ First get one password randomly from the file.  ■ N=`shuf ­i 1­15 ­n 1`; head ­n $N best15.txt |tail ­n 1  ○ Then change it with the command (put it twice):  ■ passwd test  ● Put here the password printed by the previous command.  ● Find other hosts in the network with the SSH port open  ○ nmap ­sS ­p 22 ­n ­v <your­ip­address>/24 ­oN ssh­servers.txt  ● Bruteforce the SSH password of the active hosts  ○ Medusa tool  ■ hydra ­s 22 ­l test ­P best15.txt <IP­to­crack> ssh  ● Analysis of the traffic  ○ Analyze your capture file  ○ If somebody found the password of your computer or not. And how do you  know.  ○ Bonus question: Did they access your computer and type commands on it?  How do you know?