CTF-Writeups/HTB Cyber Apocalypse/Input as a Service.md

28 lines
738 B
Markdown
Raw Normal View History

2021-04-23 23:41:00 +00:00
## Input as a Service
<img src="https://imgur.com/iowzjOV.png"/>
On connecting with the port it shows a python2 shell , giving it an input it shows an error
<img src="https://imgur.com/xVGZbfx.png"/>
But if we supply a string it won't break
<img src="https://imgur.com/k7EVczX.png"/>
On googling around to import a python module I found a techique to import a module using `___import___` as the input is accepting only string so this will be accepting as string
<img src="https://imgur.com/UwduQcf.png"/>
<img src="https://imgur.com/uoNabgx.png"/>
And we'll get the flag
<img src="https://imgur.com/ecNQSGg.png"/>
We can also look at the source
<img src="https://imgur.com/CgXIak7.png"/>
With this we solved the challenge !!