SlideShare a Scribd company logo
1 of 4
Download to read offline
   
 
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? 
 

More Related Content

What's hot

What's hot (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
 

Similar to 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.pptx
Network Analysis Mini Project 2.pptxNetwork Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptxtalkaton
 
Network Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdfNetwork Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdftalkaton
 
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
 

Similar to 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.pptx
Network Analysis Mini Project 2.pptxNetwork Analysis Mini Project 2.pptx
Network Analysis Mini Project 2.pptx
 
Network Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdfNetwork Analysis Mini Project 2.pdf
Network Analysis Mini Project 2.pdf
 
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
 

More from 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
 

More from 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
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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?