SlideShare a Scribd company logo
JavaScript for Hackers
JOAS ANTONIO
Details
This pdf is based on content from PenTest Academy and other professionals,
credits will be placed on the respective pages.
LinkedIn: https://www.linkedin.com/in/joas-antonio-dos-santos
Courses JavaScript for PenTest
https://www.pentesteracademy.com/course?id=11
https://www.youtube.com/watch?v=FTeE3OrTNoA
https://www.youtube.com/watch?v=HptfL5WRYF8
https://www.youtube.com/watch?v=-UPRQBQV5Lo
https://www.youtube.com/watch?v=mG0Sm0GQ6ck&list=PL9w1Wxb9TxnO4_0
j5NJ7zYG0WBpM8UDLs
https://www.udemy.com/course/ethical-hacking-with-python-javascript-and-kali-
linux/
XSS for PenTest – Boku7
Github: https://github.com/boku7
The codes shown in the next slides were created by boku7
XHR-formHarvester.js
https://github.com/boku7/XSS-Clientside-Attacks/blob/master/XHR-formHarvester.js
XSS-XHR-CSRF-
UploadFile-
PHPwebshell.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/XS
S-XHR-CSRF-
UploadFile-
PHPwebshell.js
XSS-XHR-
WebShellUpload.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/XS
S-XHR-
WebShellUpload.js
XSS-XHR.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/XS
S-XHR.js
alert-cookie.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/aler
t-cookie.js
autoComplete-
Harvester.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/aut
oComplete-Harvester.js
bannerMod-
deface.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/ban
nerMod-deface.js
bannerMod-
deface.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/ban
nerMod-deface.js
changeAllLinks.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/cha
ngeAllLinks.js
clickJacker.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/clic
kJacker.js
cookieHarvester
.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/clic
kJacker.js
eventListener-
alert.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/eve
ntListener-alert.js
formHijack-
credHarverter.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/for
mHijack-credHarverter.js
js2remoteScript
Source.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/js2r
emoteScriptSource.js
keylogger-
keyHarvester.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/key
logger-keyHarvester.js
remote-
alertCookie.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/re
mote-alertCookie.js
remote-
onSubmit-
FormJack-XHR.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/re
mote-onSubmit-
FormJack-XHR.js
remoteScriptS
ource.js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/re
moteScriptSource.js
replaceImage.
js
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/rep
laceImage.js
Urlencoder.py
https://github.com/boku
7/XSS-Clientside-
Attacks/blob/master/url
encoder.py
JavaScript Collection
https://github.com/bupt007/pentester-for-javascript-
https://github.com/pownjs/pown
https://github.com/gabemarshall/Brosec
https://github.com/roccomuso/netcat
https://github.com/Shmakov/Honeypot
https://github.com/silverwind/default-gateway
https://github.com/cybersecurity-acmgmrit/Javascript-Pentesting
https://github.com/HynekPetrak/javascript-malware-collection
https://github.com/geeksonsecurity/js-malicious-dataset
https://github.com/CapacitorSet/box-js
https://github.com/koto/owasp-malicious-javascript
JavaScript Doom XSS
Source: An input that could be controlled by an external (untrusted) source.
JavaScript
Doom XSS
Sink: A potentially
dangerous method that
could lead to a
vulnerability. In this case
a DOM Based XSS.
Awesome
Payloads
Awesome
Payloads
Some less detected event handlers
Awesome
Payloads
Some HTML Tags that you will be using
https://github.com/s0md3v/AwesomeXSS
Awesome
Payloads
Some HTML Tags that you will be using
https://github.com/s0md3v/AwesomeXSS
JSHacking – Ankur8931
Github: https://github.com/ankur8931
The codes shown in the next slides were created by Ankur8931
JSHacking – Ankur8931
1.form-submit.js - Hijacking form submit
2.social-engg.js - Social Engineering exploit to hijack form submit and redirect
to different page
3.mouse-click.js - Capturing mouse click events and redirecting to different
page
4.keylogger.js - loggin keystrokes to SimpleHTTPServer running on port 9000
5.event-listener.js - Listen to form submit event and show password in the
pop up alert box
6.external.js - running external js from script source to bypass any code
limitation checks
7.external-noscript.js - include external javascript without using script tags
8.replace-img.js - replace old image by new image in JS
9.autocomplete-timer.js - wait for 10s and submit the form to the attacker
server
10.xmlhttpreq.js - XML http request to send form submit parameters to the
attacker server
11.xmlhttpreq-fetch.js - Fetch email from provided URL using XML http
request
12.data-exfil.js - Exfiltration of Credit card information to the attacker server
13.csrf-token.js - Extract CSRF token and submit to web
14.csrf-token-uid.js - Extract the email using UID, and CSRF token. Display the
email address on the page.
15.html-parsing.js - Parse HTML response by exploiting xss and insert addess
into div result
16.multi-level-html.js - Extract credit card number via multi-level HTML
documents and post to the server
17.multi-json.js - Multi level JSON parsing and displaying information in the
div element result
18.multi-xml.js - Multi level XML parsing and displaying information in div
element result
autocomplete-timer.js
csrf-token-
uid.js
csrf-
token.js
csrf-
token.js
data-exfil.js
eventlistener.
js
external-noscript.js
form-
submit.js
htmlparsing.js
keylogger.js
Social-engg.js
Xmlhttpreq.js
System-command.js
Awesome XSS
https://github.com/s0md3v/AwesomeXSS
https://github.com/humblelad/Awesome-XSS-Payloads
https://owasp.org/www-community/xss-filter-evasion-cheatsheet
https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting
JavaScript Hacking
https://www.blackhat.com/presentations/bh-europe-07/Sotirov/Presentation/bh-eu-07-sotirov-apr19.pdf
https://www.blackhat.com/presentations/bh-usa-07/Sotirov/Whitepaper/bh-usa-07-sotirov-WP.pdf
https://www.blackhat.com/docs/asia-14/materials/Nafeez/Asia-14-Nafeez-JS-Suicide-Using-JavaScript-Security-Features-To-Kill-JS-
Security.pdf
https://www.blackhat.com/docs/us-17/wednesday/us-17-Randolph-Delivering-Javascript-to-World-Plus-Dog.pdf
https://www.blackhat.com/docs/eu-15/materials/eu-15-Stock-Your-Scripts-In-My-Page-What-Could-Possibly-Go-Wrong.pdf
https://i.blackhat.com/USA-20/Wednesday/us-20-Park-NoJITsu-Locking-Down-JavaScript-Engines.pdf
https://www.blackhat.com/docs/us-15/materials/us-15-Silvanovich-Attacking-ECMA-Script-Engines-With-Redefinition-wp.pdf
https://www.blackhat.com/presentations/bh-usa-07/Feinstein_and_Peck/Presentation/bh-usa-07-feinstein_and_peck.pdf
https://www.blackhat.com/presentations/bh-jp-06/BH-JP-06-Moniz.pdf
https://i.blackhat.com/eu-20/Thursday/eu-20-Heyes-Portable-Data-ExFiltration-XSS-For-PDFs-2-wp.pdf
https://www.blackhat.com/docs/us-17/thursday/us-17-Lekies-Dont-Trust-The-DOM-Bypassing-XSS-Mitigations-Via-Script-
Gadgets.pdf
Bug Bounty JavaScript for Hackers
https://medium.com/geekculture/analysing-javascript-files-for-bug-bounty-hunters-71e2727abebe
https://hackerone.com/nodejs?type=team
https://thehackerish.com/javascript-enumeration-for-bug-bounty-hunters/
https://www.youtube.com/watch?v=8sfc0PlVyWA
https://www.youtube.com/watch?v=nkznsNxDM5k
https://www.youtube.com/watch?v=G2pWVBgCjvg
https://www.youtube.com/watch?v=A3eqNoYUdGc
https://www.bugbountyhunter.com/guides/?type=javascript_files
https://www.securecoding.com/blog/monitoring-javascript-files-for-bugbounty/
https://infosecwriteups.com/bug-bounty-tips-tricks-js-javascript-files-bdde412ea49d
https://research.securitum.com/art-of-bug-bounty-a-way-from-js-file-analysis-to-xss/
Bug Bounty JavaScript for Hackers
https://bitthebyte.medium.com/javascript-for-bug-bounty-hunters-part-1-
dd08ed34b5a8
https://www.youtube.com/watch?v=vUrx113ZtEw
https://infosecwriteups.com/javascript-files-recon-23ac49fe6120
https://portswigger.net/daily-swig/facebook-offers-40k-for-javascript-vulnerabilities-
in-bug-bounty-program
https://jsoverson.medium.com/hacking-javascript-with-javascript-6adbeaba22e9
Laboratory
https://portswigger.net/web-security/cross-site-scripting/reflected/lab-html-context-
nothing-encoded
https://github.com/paralax/xss-labs
https://pentesterlab.com/exercises/xss_and_mysql_file/course
https://challenge-0721.intigriti.io/
https://www.youtube.com/watch?v=IhPsBMBDFcg
https://www.youtube.com/watch?v=Wbovgw3Qxxc
https://blog.isiraadithya.com/intigriti-0321-xss-challenge-writeup/

More Related Content

PDF
Breach and attack simulation tools
PDF
Osint presentation nov 2019
PPTX
SSRF For Bug Bounties
PDF
PDF
Social engineering attacks
PDF
Threat Intelligence
PPTX
How to Test for The OWASP Top Ten
PPTX
Password Cracking
Breach and attack simulation tools
Osint presentation nov 2019
SSRF For Bug Bounties
Social engineering attacks
Threat Intelligence
How to Test for The OWASP Top Ten
Password Cracking

What's hot (20)

PPTX
WTF is Penetration Testing v.2
PPTX
BTRisk - Siber Olay Tespit ve Mudahale Egitimi
PDF
Web App Security Presentation by Ryan Holland - 05-31-2017
PDF
Entity provider selection confusion attacks in JAX-RS applications
PPT
Web Application Security
PPTX
VAPT PRESENTATION full.pptx
PPTX
Cyber Threat Intelligence.pptx
PPTX
Malware Analysis
PPT
Cyber security standards
PPTX
information security awareness course
PDF
Cyber Threat Intelligence
PPTX
Presentation on 'Understanding and Utilising Threat Intelligence in Cybersecu...
PPTX
PPTX
Osint {open source intelligence }
PDF
Cyber Threat Intelligence
PPTX
Social engineering
PPTX
What is Threat Hunting? - Panda Security
WTF is Penetration Testing v.2
BTRisk - Siber Olay Tespit ve Mudahale Egitimi
Web App Security Presentation by Ryan Holland - 05-31-2017
Entity provider selection confusion attacks in JAX-RS applications
Web Application Security
VAPT PRESENTATION full.pptx
Cyber Threat Intelligence.pptx
Malware Analysis
Cyber security standards
information security awareness course
Cyber Threat Intelligence
Presentation on 'Understanding and Utilising Threat Intelligence in Cybersecu...
Osint {open source intelligence }
Cyber Threat Intelligence
Social engineering
What is Threat Hunting? - Panda Security

Similar to JavaScript for Hackers.pdf (20)

PPT
Velocity EU 2012 - Third party scripts and you
PDF
Front End Development for Back End Developers - UberConf 2017
PPTX
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
PDF
Front End Development for Back End Developers - vJUG24 2017
PDF
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
PDF
URL Design
PPTX
The Last Mile
PPTX
Micro frontends
PPT
Benefit of CodeIgniter php framework
PPTX
High Performance Snippets
KEY
CICONF 2012 - Don't Make Me Read Your Mind
PPTX
Introduction to JQuery, ASP.NET MVC and Silverlight
PDF
Banquet 42
PDF
夜宴42期《Gadgets》
PDF
Http/2 - What's it all about?
PPTX
PHP on Windows
PPTX
PHP on Windows
PPTX
SharePoint 2010 authentications
PPTX
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018
Velocity EU 2012 - Third party scripts and you
Front End Development for Back End Developers - UberConf 2017
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Front End Development for Back End Developers - vJUG24 2017
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
URL Design
The Last Mile
Micro frontends
Benefit of CodeIgniter php framework
High Performance Snippets
CICONF 2012 - Don't Make Me Read Your Mind
Introduction to JQuery, ASP.NET MVC and Silverlight
Banquet 42
夜宴42期《Gadgets》
Http/2 - What's it all about?
PHP on Windows
PHP on Windows
SharePoint 2010 authentications
Troubleshooting SEO for JS Frameworks - Patrick Stox - DTD 2018

Recently uploaded (20)

PPTX
Probability Distribution, binomial distribution, poisson distribution
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PDF
IFRS Notes in your pocket for study all the time
PDF
Digital Marketing & E-commerce Certificate Glossary.pdf.................
PDF
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
PPTX
Lecture (1)-Introduction.pptx business communication
PDF
Chapter 5_Foreign Exchange Market in .pdf
PDF
Tata consultancy services case study shri Sharda college, basrur
PDF
How to Get Funding for Your Trucking Business
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PPT
Chapter four Project-Preparation material
PDF
Nidhal Samdaie CV - International Business Consultant
PPTX
ICG2025_ICG 6th steering committee 30-8-24.pptx
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PDF
Laughter Yoga Basic Learning Workshop Manual
PPT
Lecture 3344;;,,(,(((((((((((((((((((((((
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PPTX
3. HISTORICAL PERSPECTIVE UNIIT 3^..pptx
Probability Distribution, binomial distribution, poisson distribution
unit 1 COST ACCOUNTING AND COST SHEET
IFRS Notes in your pocket for study all the time
Digital Marketing & E-commerce Certificate Glossary.pdf.................
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
Lecture (1)-Introduction.pptx business communication
Chapter 5_Foreign Exchange Market in .pdf
Tata consultancy services case study shri Sharda college, basrur
How to Get Funding for Your Trucking Business
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
Chapter four Project-Preparation material
Nidhal Samdaie CV - International Business Consultant
ICG2025_ICG 6th steering committee 30-8-24.pptx
Ôn tập tiếng anh trong kinh doanh nâng cao
Laughter Yoga Basic Learning Workshop Manual
Lecture 3344;;,,(,(((((((((((((((((((((((
Reconciliation AND MEMORANDUM RECONCILATION
3. HISTORICAL PERSPECTIVE UNIIT 3^..pptx

JavaScript for Hackers.pdf