보안/KaliLinux

kali linux Metasploitable2 Port 3306 Mysql

lowcodingpython 2022. 3. 8. 04:37
반응형
가상 머신 : vmware 16.2 
공격자 : kali_linux 2022.1ver [192.168.17.120] 
피해자 : metasploitable2 [192.168.17.129]

네트워크 (VMnet 8 NAT)

Mysql

세계에서 가장 많이 쓰이는 오픈 소스의 관계형 데이터베이스 관리 시스템


해당 모의해킹에서는 2가지의 방법으로 상대방의 데이터베이스의 버전을 알 수 있습니다.

 

1. scanner_mysql_version 모듈을 사용한 방법

상대방의 IP를 지정 후 공격을 실행하면 MySQL에 대한 버전 정보를 알 수 있습니다.

mysql-version

2. nmap port scan을 통한 버전 정보 획득

nmap-스캔


 

Module options (auxiliary/scanner/mysql/mysql_login):

   Name              Current Setting  Required  Description
   ----              ---------------  --------  -----------
   BLANK_PASSWORDS   true             no        Try blank passwords for all users
   BRUTEFORCE_SPEED  5                yes       How fast to bruteforce, from 0 to 5
   DB_ALL_CREDS      false            no        Try each user/password couple stored in the current database
   DB_ALL_PASS       false            no        Add all passwords in the current database to the list
   DB_ALL_USERS      false            no        Add all users in the current database to the list
   DB_SKIP_EXISTING  none             no        Skip existing credentials stored in the current database (Acc
                                                epted: none, user, user&realm)
   PASSWORD                           no        A specific password to authenticate with
   PASS_FILE                          no        File containing passwords, one per line
   Proxies                            no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                             yes       The target host(s), see https://github.com/rapid7/metasploit-
                                                framework/wiki/Using-Metasploit
   RPORT             3306             yes       The target port (TCP)
   STOP_ON_SUCCESS   false            yes       Stop guessing when a credential works for a host
   THREADS           1                yes       The number of concurrent threads (max one per host)
   USERNAME          root             no        A specific username to authenticate as
   USERPASS_FILE                      no        File containing users and passwords separated by space, one p
                                                air per line
   USER_AS_PASS      false            no        Try the username as the password for all users
   USER_FILE                          no        File containing usernames, one per line
   VERBOSE           true             yes       Whether to print output for all attempts

모듈-옵션-지정

무차별 대입 공격을 위해 mysql_login 모듈로 변경 후 위의 옵션 표를 참고하여 

필요한 옵션을 지정 후 공격을 진행하시면 됩니다.

exlpoit

위에서 얻은 정보를 통하여 mysql 서버에 접속 

반응형