Web Hacking: JavaScript Essentials (TryHackMe)

In this article, I will write a write-up for Web Hacking: Javascript Essentials that covers the Essentials Concepts, Javascript Overview, Integrating Javascript in HTML, Abusing Dialogue Functions, Bypassing Control Flow Statements, Exploring Minified Files, and Best Practices.
What term allows you to run a code block multiple times as long as it is a condition?
loopWhat is the code output if the value of x is changed to 10?
The result is: 20Is JavaScript a compiled or interpreted language?
InterpretedWhich type of JavaScript integration places the code directly within the HTML document?
InternalWhich method is better for reusing JS across multiple web pages?
ExternalWhat is the name of the external JS file that is being called by external_test.html?
thm_external.jsWhat attribute links an external JS file in the <script> tag?
srcIn the file invoice.html, how many times does the code show the alert Hacked?
3Which of the JS interactive elements should be used to display a dialogue box that asks the user for input?
promptIf the user enters Tesla, what value is stored in the carName= prompt("What is your car name?")? in the carName variable?
TeslaWhat is the message displayed if you enter the age less than 18?
You are a minor.
What is the password for the user admin?
ComplexPassword
What is the alert message shown after running the file hello.html?
Welcome to THMWhat is the value of the age variable in the following obfuscated code snippet?age=0x10x247e+0x35-0x2e+-0x1ae3;
21
Obfuscation is still unclear to me but there’s this YouTube Video that has a walkthrough from around minute 26 and also use this Javascript Obfuscator Tool as well as tools like ChatGPT for more deep dive into the topic 15. Is it a good practice to blindly include JS in your code from any source (yea/nay)? nay
Thank you for reading my article. Please leave any questions or comments on improving my learning journey and the THM challenges.




