
Learn how to use JavaScript for ethical hacking, including cross-site scripting, and demonstrate vulnerability severity to clients. Build a lab, apply testing methodology, and explore tampering, cookies, and knowledge-based authentication.
Explain and demonstrate how web applications can be compromised and defended, using JavaScript to support penetration testing against the OWASP top 10.
Apply ethical hacking mindset in javascript to defend clients and organizations by understanding how bad actors think, while keeping knowledge neutral and methods morally, ethically, and legally correct.
Revisit essential JavaScript concepts: comparisons, logical operators, conditionals, loops, and functions to strengthen your scripting skills for ethical hacking.
Explore how JavaScript responds to events in HTML elements, including on submit, on change, click, and key events. Intercept and handle these events, using unload to run code.
Explore the document object model to access and modify a web page with JavaScript, including reading and setting properties, and manipulating cookies, forms, images, and dynamic content.
Explore cross-site scripting fundamentals by examining reflected XSS, its server-side vulnerability, and how untrusted input echoed back to browsers enables malicious code execution.
Identify how persistent cross-site scripting stores malicious input in a database and renders it to all visitors, enabling a large-scale browser attack on forums and guest books.
Explore DOM-based cross-site scripting, a client-side XSS that manipulates the browser's document object model, echoes unvalidated name content via innerHTML, and highlights the need for validation.
Set up a safe lab with web security dojo on Oracle's VirtualBox to practice ethical hacking against DVWA for target practice, focusing on exploitation and reporting.
Learn to use Burp Suite's decoder tab to encode and decode text for URL strings, with practical demonstrations that build encoding skills and traffic manipulation expertise.
Learn how to stand up a simple Python web server to test proof-of-concept exploits and exchange data between systems, serving content from working directory and logging GET and POST requests.
Netcat demonstrates opening and maintaining socket connections, setting a listener on port 88, and exchanging data with a client via JavaScript to send information to a server.
Aligns a penetration testing methodology from vulnerability discovery to exploitation, with ethical demonstration, using notepad++ and burp suite's decoder for url encoding, and proof-of-concept code on a vulnerable web app.
Students exploit a reflective cross-site scripting vulnerability to alter a page's h1 content using JavaScript, demonstrating a proof-of-concept defacement on a vulnerable web app.
Demonstrate leveraging a cross-site scripting vulnerability to inject a social engineering message directing users to a fictitious helpdesk for credential resets, while removing the login form via DOM manipulation.
Explore cross-site scripting vulnerabilities that tamper page links by altering anchor hrefs and innerHTML, and demonstrate a proof-of-concept by iterating through anchors to redirect to a site of our choosing.
Demonstrate how to disclose cookie contents using a one-line JavaScript payload that reads document.cookie and displays it in a pop-up, leveraging a cross-site scripting vulnerability for demonstration.
Demonstrates stealing cookies through cross-site scripting by injecting JavaScript, hijacking a fake image request to exfiltrate document.cookie to a controlled server.
Explore reflective cross-site scripting by injecting a fake login page into a vulnerable web app to capture credentials and send them to a server using a JavaScript and HTML mix.
Explore techniques to simulate social engineering and reflected cross-site scripting to obtain extra form data, including injecting a custom user interface and capturing submissions for ethical penetration testing.
Demonstrates weaknesses in knowledge-based authentication by injecting a fake UI to collect secret questions and answers, exploiting reflective cross-site scripting to harvest data in a safe lab.
Explore how reflected cross-site scripting uses navigator.appVersion to detect a user's operating system for targeted spear phishing.
Demonstrates a spear phishing browser detection attack that interrogates the navigator object to reveal browser name, version, cookies status, platform, and user agent for pen test reporting.
Capture user mouse clicks with a JavaScript event listener and redirect the page, demonstrating a reflected cross-site scripting vulnerability and a payload in a pen test report.
Shows a javascript keylogger leveraging a reflected cross-site scripting vulnerability to capture keystrokes from form fields and exfiltrate them to a server via image beacon.
Demonstrates exploiting a reflected cross-site scripting vulnerability to post a fraudulent message on a forum, using a post request to simulate a real user post.
Explore how a reflected cross-site scripting flaw becomes a stored XSS attack by injecting payloads into a forum page, demonstrating attack chaining and the need to clean up test data.
Explore how a JavaScript-based cross-site request forgery attack exploits a reflected XSS flaw and missing anti-csrf tokens to change the administrator password in a vulnerable web app.
Learn how remote JavaScript files are used in reflected cross-site scripting to bypass input length checks and expose cookies via a remote script, using Burp Suite for encoding.
Demonstrates chaining a reflected cross-site scripting attack with a local file inclusion vulnerability to read the Linux password file, illustrating a proof-of-concept exploit in a vulnerable web app.
Exploit a reflected cross-site scripting foothold to perform a command injection that creates a hack file on the target system, demonstrating access to the file system and operating system.
Learn how to upload a web shell by chaining reflected cross-site scripting and command injection across JavaScript, PHP, and Linux shell commands, with a proof-of-concept using an XML HTTP request.
Defend web applications with the OWASP top ten, preventing broken access control, cryptographic failures, injections, insecure design, misconfiguration, authentication failures, and data integrity issues; apply cookie security and token handling.
Switching from http to a secure protocol protects data in transit. Set the secure flag on cookies and use the hdp-only flag to prevent JavaScript access.
Explore secure design and access control flaws that enable CSRF exploits and improper password changes, and learn how authorization checks and server hardening reduce attack surface.
Block untrusted input through validation and whitelisting, enforce length checks, and encode output to prevent cross-site scripting; deploy a web application firewall for defense in depth and virtual patching.
You've found a XSS vulnerability....but now what?
Has a client ever wanted you to demonstrate the danger of a vulnerability you found for them?
If so, then you need to Learn Ethical Hacking with JavaScript! After this course, you will be able to exploit web security vulnerabilities by using a variety of skills and techniques centered on JavaScript.
After a quick review of some common web application flaws, we'll jump right into using JavaScript as an offensive weapon against the application and clients.
Each topic is presented from the perspective of requiring the pentester to demonstrate how a vulnerability can be exploited and the potential impact of not taking corrective action. The course provides a balanced mix of theory, code, and live demonstrations of each exploit in action.
Learn to tamper with site content - altering the page, forms, links, and functionality. Then take it to the next level by abusing HTML forms to capture additional data on form submission, sending that data to a server you control.
See how to disclose the contents of user cookies, then quickly move to stealing the cookies and sending them to another server. Learn to steal credentials and abuse application authentication.
Further compromise users by capturing mouse interactions and implementing a custom key logger. Learn to abuse knowledge-based authentication schemes such as the secret question/answer approach for account resets.
Progress to more advanced techniques where you learn to chain together multiple attacks aimed at exploiting several application vulnerabilities simultaneously. Areas covered here include creating fraudulent forum posts, spear phishing campaigns, and using command injection to access a web server's operating system.
And we'll wrap the course up with some defensive techniques you can use to prevent the types of attacks we've been launching at web applications.
All Ethical Hacking! All done with JavaScript!