SlideShare a Scribd company logo
Howto get browser
persistence and
remote execution
Goals:
● Infect web browsers
● Be able to execute javascript in victim(s) browser
● Intercept user traffic (“keylogger”)
● Create a botnet
● Don’t fuck up for anyone (at least good people)
Security Challenge: First off, how to get access?
Option #1: Physical access
● Hassle to spread
● Expensive with many USBs
● Risky
● Requires a lot of traveling
● Or social engineering
How to infect, and run javascript?
Option #2: Hack a server
● Everyone is doing it
● You have to work with PHP
● Looking for exploits and weakspots in PHP software is lame
● Web sites with great visitor numbers are more secured
How to infect, and run javascript?
Option #3: Pishing
● It just sounds lame
● Trick stupid people isn’t funny
● Lot of heat for little gain
● The need of fake websites
● The need to distribute a shitload of spam
How to infect, and run javascript?
Option #3.1: Man in the middle attacks: Local LAN
● Works great when you’re on the <LAN>
● Hassle to get into private LAN’s
● You need access to a lot of LAN’s
● Can’t start with fake certificates, too risky
● Don’t scale
How to infect, and run javascript?
Option #3.2: Man in the middle attacks: Tor exit node
● Again,everyone does it..
● Short lived fun, automatic scans of modified content
● You need to switch IP quite often to avoid ban
● Tor Browsers have NoScript on per default
● Don’t give Tor a worse name than it got, it’s our last hope :)
How to infect, and run javascript?
Option #3.3: Man in the middle attacks: Ads
● Visiting ads company sites is fun for your javascript engine
● Less options on most sites (bbcodes and “IDEs”)
● Pay for browser minutes is actually an industry
● Lame to pay for servers, and ads
How to infect, and run javascript?
Option #3.4: Man in the middle attacks: Http proxy
● It’s built upon MITM architecture
● It’s a lot of proxy lists out there, which copies each others
● Less to hassle with, perfect when lazy
● Apparently still quite popular
● Often chained, so the user can feel “safe”
● At least 80% of all users are bad people
How to infect, and run javascript?
Interesting facts about http proxies
● Access to edit or remove the following security headers
• Cross-Origin Resource Sharing (CORS)
• Same-Origin Policy
• X-Frame-Options
● TLS/SSL traffic often leak info at the start of connection
• URL
• POST body
How to infect, and run javascript?
So how do we do it then, where to start?
● Write a TOS/Privacy policy warn good people
● The TOS is quite similar to US gov’s TOS, should be legal
● Then, find countries with no deal with Norway/EU
● Preferably a countries without internet laws at all (to be safe)
● Use Tor for registration with a fake name and for ssh
How to infect, and run javascript?
So how do we do it then, technical speaking?
● Setup a proxy chain where all non TLS/SSL traffic is checked
● Inject minimal javascript code (2-3lines) into all .js fetched
● Fallback on html inject if no .js fetched
● Pass through all other traffic as normal
How to infect, and run javascript?
So, what about this javascript code?
● Don’t use Beef (The Browser Exploitation Framework) loaders
● Or any other well known loader for that matter
● Pain, but just ECMA 5 written without any babel/webpack
● Build your own “webpack” if needed
● Use workers if available
How to infect, and run javascript?
Why strict javascript rules?
● Beef and common loaders get picked up by AV and similar
● It need to load and run fast, undetected
● Support old browsers without big third party libraries
● Being detected often tend to make the proxy marked bad
● The script needs to adjust to all kinds of environments
How to infect, and run javascript?
So, how about the persistence part?
● This is the tricky and fun part, it’s no good way
● However, you can make your code load quite often
• Specially target small CDN’s delivering jquery or whatever
• Set cache time to 2070 on CDN’s javascript file or something
• Runs on each website that uses the lib and the CDN
• Bonus: no evidence on victim computer if wished (Drop cache)
How to infect, and run javascript?
Did it work?
● Too good
● A botnet is archived
● No legitimate traffic found (out of ~1Tb of traffic)
● Nothing done to victim computers, content & bots removed
● Data deleted
● No, Knowit didn’t have anything at all to do with this test
How to infect, and run javascript?
What did we learn?
● Again, Knowit didn’t have anything at all to do with this test
● You can archive a botnet quite easy
● Could perform quite massive DDoS attacks (lame)
● Could control victim’s browser “tab” after proxy usage
● Can be updated over internet, “unlimited possibilities”
How to infect, and run javascript?
Mikal Villa
mikal.villa@knowit.no, @mikalv
2017-08-21 TSC Summit #4
Thanks

More Related Content

What's hot (19)

Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
CTruncer
 
Wordpress Plugins Scanner
Wordpress Plugins ScannerWordpress Plugins Scanner
Wordpress Plugins Scanner
Avădănei Andrei
 
"Introduction to Bug Hunting", Yasser Ali
"Introduction to Bug Hunting", Yasser Ali"Introduction to Bug Hunting", Yasser Ali
"Introduction to Bug Hunting", Yasser Ali
HackIT Ukraine
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
CTruncer
 
Петър Николов. "Mobile Ecommerce Technical Performance"
Петър Николов. "Mobile Ecommerce Technical Performance"Петър Николов. "Mobile Ecommerce Technical Performance"
Петър Николов. "Mobile Ecommerce Technical Performance"
DariaShalahinova
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
CTruncer
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the Wild
CTruncer
 
Wordlist Generation and Wifi Cracking
Wordlist Generation and Wifi CrackingWordlist Generation and Wifi Cracking
Wordlist Generation and Wifi Cracking
Shakar Bhattarai
 
Lessons learned from Node.js - Callbacks / Promises
Lessons learned from Node.js - Callbacks / PromisesLessons learned from Node.js - Callbacks / Promises
Lessons learned from Node.js - Callbacks / Promises
Jason K Yau
 
11 Commandments of Cyber Security for the Home
11 Commandments of Cyber Security for the Home11 Commandments of Cyber Security for the Home
11 Commandments of Cyber Security for the Home
zaimorkai
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your Network
CTruncer
 
WordCamp Barcelona 2015 : From Design to a Theme
WordCamp Barcelona 2015 : From Design to a ThemeWordCamp Barcelona 2015 : From Design to a Theme
WordCamp Barcelona 2015 : From Design to a Theme
Pancho Pérez Salazar
 
MonkeySpider at Sicherheit 2008
MonkeySpider at Sicherheit 2008MonkeySpider at Sicherheit 2008
MonkeySpider at Sicherheit 2008
Ali Ikinci
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
Brandon Arvanaghi
 
HTML5 Messaging (Post Message)
HTML5 Messaging (Post Message)HTML5 Messaging (Post Message)
HTML5 Messaging (Post Message)
NSConclave
 
Sencha Touch in Action
Sencha Touch in Action Sencha Touch in Action
Sencha Touch in Action
Patrick Sheridan
 
Understanding and implementing website security
Understanding and implementing website securityUnderstanding and implementing website security
Understanding and implementing website security
Drew Gorton
 
Error Handling in WebRTC
Error Handling in WebRTCError Handling in WebRTC
Error Handling in WebRTC
Anant Narayanan
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
CTruncer
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
CTruncer
 
"Introduction to Bug Hunting", Yasser Ali
"Introduction to Bug Hunting", Yasser Ali"Introduction to Bug Hunting", Yasser Ali
"Introduction to Bug Hunting", Yasser Ali
HackIT Ukraine
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
CTruncer
 
Петър Николов. "Mobile Ecommerce Technical Performance"
Петър Николов. "Mobile Ecommerce Technical Performance"Петър Николов. "Mobile Ecommerce Technical Performance"
Петър Николов. "Mobile Ecommerce Technical Performance"
DariaShalahinova
 
Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
CTruncer
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the Wild
CTruncer
 
Wordlist Generation and Wifi Cracking
Wordlist Generation and Wifi CrackingWordlist Generation and Wifi Cracking
Wordlist Generation and Wifi Cracking
Shakar Bhattarai
 
Lessons learned from Node.js - Callbacks / Promises
Lessons learned from Node.js - Callbacks / PromisesLessons learned from Node.js - Callbacks / Promises
Lessons learned from Node.js - Callbacks / Promises
Jason K Yau
 
11 Commandments of Cyber Security for the Home
11 Commandments of Cyber Security for the Home11 Commandments of Cyber Security for the Home
11 Commandments of Cyber Security for the Home
zaimorkai
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your Network
CTruncer
 
WordCamp Barcelona 2015 : From Design to a Theme
WordCamp Barcelona 2015 : From Design to a ThemeWordCamp Barcelona 2015 : From Design to a Theme
WordCamp Barcelona 2015 : From Design to a Theme
Pancho Pérez Salazar
 
MonkeySpider at Sicherheit 2008
MonkeySpider at Sicherheit 2008MonkeySpider at Sicherheit 2008
MonkeySpider at Sicherheit 2008
Ali Ikinci
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
Brandon Arvanaghi
 
HTML5 Messaging (Post Message)
HTML5 Messaging (Post Message)HTML5 Messaging (Post Message)
HTML5 Messaging (Post Message)
NSConclave
 
Understanding and implementing website security
Understanding and implementing website securityUnderstanding and implementing website security
Understanding and implementing website security
Drew Gorton
 
Error Handling in WebRTC
Error Handling in WebRTCError Handling in WebRTC
Error Handling in WebRTC
Anant Narayanan
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
CTruncer
 

Similar to TSC Summit #4 - Howto get browser persitence and remote execution (JS) (20)

Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
Niranjanaa Ragupathy
 
All Aboard The Stateful Train
All Aboard The Stateful TrainAll Aboard The Stateful Train
All Aboard The Stateful Train
SmartLogic
 
Defcon 23 - David Huerta - alice and bob are really confused
Defcon 23 - David Huerta - alice and bob are really confusedDefcon 23 - David Huerta - alice and bob are really confused
Defcon 23 - David Huerta - alice and bob are really confused
Felipe Prado
 
Breaking The Curse of Web Application Encryption Using Browser Bruter
Breaking The Curse of Web Application Encryption Using Browser BruterBreaking The Curse of Web Application Encryption Using Browser Bruter
Breaking The Curse of Web Application Encryption Using Browser Bruter
Jafar Pathan
 
SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0
Mike Belshe
 
Ransomware - what is it, how to protect against it
Ransomware - what is it, how to protect against itRansomware - what is it, how to protect against it
Ransomware - what is it, how to protect against it
Zoltan Balazs
 
Defcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanningDefcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanning
zulla
 
Defcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanningDefcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanning
zulla
 
Real Time Realitites
Real Time RealititesReal Time Realitites
Real Time Realitites
markisuak
 
PyMultitor
PyMultitorPyMultitor
PyMultitor
Tomer Zait
 
Web Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your websiteWeb Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your website
Andrew Sorensen
 
Practical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon XPractical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon X
Michele Orru
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the UglyHTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the Ugly
Mario Heiderich
 
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
PROIDEA
 
Security and why you need to review yours.
Security and why you need to review yours.Security and why you need to review yours.
Security and why you need to review yours.
David Busby, CISSP
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
Daniel Garcia (a.k.a cr0hn)
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Hyper Island - 2012
Hyper Island - 2012Hyper Island - 2012
Hyper Island - 2012
Detectify
 
Security Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against ThemSecurity Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against Them
Martin Vigo
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
Niranjanaa Ragupathy
 
All Aboard The Stateful Train
All Aboard The Stateful TrainAll Aboard The Stateful Train
All Aboard The Stateful Train
SmartLogic
 
Defcon 23 - David Huerta - alice and bob are really confused
Defcon 23 - David Huerta - alice and bob are really confusedDefcon 23 - David Huerta - alice and bob are really confused
Defcon 23 - David Huerta - alice and bob are really confused
Felipe Prado
 
Breaking The Curse of Web Application Encryption Using Browser Bruter
Breaking The Curse of Web Application Encryption Using Browser BruterBreaking The Curse of Web Application Encryption Using Browser Bruter
Breaking The Curse of Web Application Encryption Using Browser Bruter
Jafar Pathan
 
SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0SPDY and What to Consider for HTTP/2.0
SPDY and What to Consider for HTTP/2.0
Mike Belshe
 
Ransomware - what is it, how to protect against it
Ransomware - what is it, how to protect against itRansomware - what is it, how to protect against it
Ransomware - what is it, how to protect against it
Zoltan Balazs
 
Defcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanningDefcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanning
zulla
 
Defcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanningDefcon 20-zulla-improving-web-vulnerability-scanning
Defcon 20-zulla-improving-web-vulnerability-scanning
zulla
 
Real Time Realitites
Real Time RealititesReal Time Realitites
Real Time Realitites
markisuak
 
Web Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your websiteWeb Security: What's wrong, and how the bad guys can break your website
Web Security: What's wrong, and how the bad guys can break your website
Andrew Sorensen
 
Practical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon XPractical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon X
Michele Orru
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the UglyHTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the Ugly
Mario Heiderich
 
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
CONFidence 2018: XSS is dead. We just don't get it (Mario Heiderich)
PROIDEA
 
Security and why you need to review yours.
Security and why you need to review yours.Security and why you need to review yours.
Security and why you need to review yours.
David Busby, CISSP
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Hyper Island - 2012
Hyper Island - 2012Hyper Island - 2012
Hyper Island - 2012
Detectify
 
Security Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against ThemSecurity Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against Them
Martin Vigo
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 

Recently uploaded (20)

Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
What's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff HustonWhat's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff Huston
APNIC
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
final project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptxfinal project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptx
ESTEFANOANDREYGARCIA
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
How to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any DowntimeHow to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any Downtime
steve198109
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
David Bernard Ezell
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
data science data stoger Presentation1.pptx
data science data stoger Presentation1.pptxdata science data stoger Presentation1.pptx
data science data stoger Presentation1.pptx
sandeepsherkhane830
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
What's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff HustonWhat's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff Huston
APNIC
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
final project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptxfinal project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptx
ESTEFANOANDREYGARCIA
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
How to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any DowntimeHow to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any Downtime
steve198109
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
David Bernard Ezell
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
data science data stoger Presentation1.pptx
data science data stoger Presentation1.pptxdata science data stoger Presentation1.pptx
data science data stoger Presentation1.pptx
sandeepsherkhane830
 

TSC Summit #4 - Howto get browser persitence and remote execution (JS)

  • 1. Howto get browser persistence and remote execution
  • 2. Goals: ● Infect web browsers ● Be able to execute javascript in victim(s) browser ● Intercept user traffic (“keylogger”) ● Create a botnet ● Don’t fuck up for anyone (at least good people) Security Challenge: First off, how to get access?
  • 3. Option #1: Physical access ● Hassle to spread ● Expensive with many USBs ● Risky ● Requires a lot of traveling ● Or social engineering How to infect, and run javascript?
  • 4. Option #2: Hack a server ● Everyone is doing it ● You have to work with PHP ● Looking for exploits and weakspots in PHP software is lame ● Web sites with great visitor numbers are more secured How to infect, and run javascript?
  • 5. Option #3: Pishing ● It just sounds lame ● Trick stupid people isn’t funny ● Lot of heat for little gain ● The need of fake websites ● The need to distribute a shitload of spam How to infect, and run javascript?
  • 6. Option #3.1: Man in the middle attacks: Local LAN ● Works great when you’re on the <LAN> ● Hassle to get into private LAN’s ● You need access to a lot of LAN’s ● Can’t start with fake certificates, too risky ● Don’t scale How to infect, and run javascript?
  • 7. Option #3.2: Man in the middle attacks: Tor exit node ● Again,everyone does it.. ● Short lived fun, automatic scans of modified content ● You need to switch IP quite often to avoid ban ● Tor Browsers have NoScript on per default ● Don’t give Tor a worse name than it got, it’s our last hope :) How to infect, and run javascript?
  • 8. Option #3.3: Man in the middle attacks: Ads ● Visiting ads company sites is fun for your javascript engine ● Less options on most sites (bbcodes and “IDEs”) ● Pay for browser minutes is actually an industry ● Lame to pay for servers, and ads How to infect, and run javascript?
  • 9. Option #3.4: Man in the middle attacks: Http proxy ● It’s built upon MITM architecture ● It’s a lot of proxy lists out there, which copies each others ● Less to hassle with, perfect when lazy ● Apparently still quite popular ● Often chained, so the user can feel “safe” ● At least 80% of all users are bad people How to infect, and run javascript?
  • 10. Interesting facts about http proxies ● Access to edit or remove the following security headers • Cross-Origin Resource Sharing (CORS) • Same-Origin Policy • X-Frame-Options ● TLS/SSL traffic often leak info at the start of connection • URL • POST body How to infect, and run javascript?
  • 11. So how do we do it then, where to start? ● Write a TOS/Privacy policy warn good people ● The TOS is quite similar to US gov’s TOS, should be legal ● Then, find countries with no deal with Norway/EU ● Preferably a countries without internet laws at all (to be safe) ● Use Tor for registration with a fake name and for ssh How to infect, and run javascript?
  • 12. So how do we do it then, technical speaking? ● Setup a proxy chain where all non TLS/SSL traffic is checked ● Inject minimal javascript code (2-3lines) into all .js fetched ● Fallback on html inject if no .js fetched ● Pass through all other traffic as normal How to infect, and run javascript?
  • 13. So, what about this javascript code? ● Don’t use Beef (The Browser Exploitation Framework) loaders ● Or any other well known loader for that matter ● Pain, but just ECMA 5 written without any babel/webpack ● Build your own “webpack” if needed ● Use workers if available How to infect, and run javascript?
  • 14. Why strict javascript rules? ● Beef and common loaders get picked up by AV and similar ● It need to load and run fast, undetected ● Support old browsers without big third party libraries ● Being detected often tend to make the proxy marked bad ● The script needs to adjust to all kinds of environments How to infect, and run javascript?
  • 15. So, how about the persistence part? ● This is the tricky and fun part, it’s no good way ● However, you can make your code load quite often • Specially target small CDN’s delivering jquery or whatever • Set cache time to 2070 on CDN’s javascript file or something • Runs on each website that uses the lib and the CDN • Bonus: no evidence on victim computer if wished (Drop cache) How to infect, and run javascript?
  • 16. Did it work? ● Too good ● A botnet is archived ● No legitimate traffic found (out of ~1Tb of traffic) ● Nothing done to victim computers, content & bots removed ● Data deleted ● No, Knowit didn’t have anything at all to do with this test How to infect, and run javascript?
  • 17. What did we learn? ● Again, Knowit didn’t have anything at all to do with this test ● You can archive a botnet quite easy ● Could perform quite massive DDoS attacks (lame) ● Could control victim’s browser “tab” after proxy usage ● Can be updated over internet, “unlimited possibilities” How to infect, and run javascript?