During our Penetration Test, we came across a web server that contains JavaScript and APIs. We need to determine their functionality to understand how it can negatively affect our customer.
Target(s): 83.136.254.177:37202
Repeat what you learned in this section, and you should find a secret flag, what is it?
It's in the HTML source code: HTB{4lw4y5_r34d_7h3_50urc3}
Using what you learned in this section, try to deobfuscate 'secret.js' in order to get the content of the flag. What is the flag?
I took the scripy.js and used https://matthewfl.com/unPacker.html because the hint was to "Deobfuscate, not "Beautufy"
Try applying what you learned in this section by sending a 'POST' request to '/serial.php'. What is the response you get?
Using what you learned in this section, determine the type of encoding used in the string you got at previous exercise, and decode it. To get the flag, you can send a 'POST' request to 'serial.php', and set the data as "serial=YOUR_DECODED_OUTPUT".
Try to study the HTML code of the webpage, and identify used JavaScript code within it. What is the name of the JavaScript file being used?
Once you find the JavaScript code, try to run it to see if it does any interesting functions. Did you get something in return?
As you may have noticed, the JavaScript code is obfuscated. Try applying the skills you learned in this module to deobfuscate the code, and retrieve the 'flag' variable.
Try to Analyze the deobfuscated JavaScript code, and understand its main functionality. Once you do, try to replicate what it's doing to get a secret key. What is the key?
Once you have the secret key, try to decide it's encoding method, and decode it. Then send a 'POST' request to the same previous page with the decoded key as "key=DECODED_KEY". What is the flag you got?