HackPack CTF 2020 - jsclean
JavaScript Cleaning Service: Transform ugly JavaScript files to pretty clean JavaScript files!
nc cha.hackpack.club:41718
Files: repo
Analysis
In this challenge we can see the source code of the service running on target system.
Service accepts javascript filename and content, then it saved under specified filename. Once thats done it executes index.js
by passing our file as one of the arguments.
We can easily exploit this service by overwriting index.js file with our content and executing any command we want.
We pass as filename: index.js
And javascript content that will execute commands:
Written on April 29, 2020