HackTheBox Nibbles Walkthrough
Nibbles IP address : 10.10.10.75 Nmap result $ nmap -sV -sT -sC 10.10.10.75 Starting Nmap 7.93 ( https://nmap.org ) at 2022-12-17 05:59 EST Nmap scan report for 10.10.10.75 Host is up (0.11s latency). Not shown: 998 closed tcp ports (conn-refused) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048 c4f8ade8f80477decf150d630a187e49 (RSA) | 256 228fb197bf0f1708fc7e2c8fe9773a48 (ECDSA) |_ 256 e6ac27a3b5a9f1123c34a55d5beb3de9 (ED25519) 80/tcp open http Apache httpd 2....
nmap cheat sheet
Nmap cheat sheet $ nmap <scan types> <options> <target> -snDisables port scanning. -oA tnetStores the results in all formats starting with the name ’tnet'. -iLPerforms defined scans against targets in provided ‘hosts.lst’ list. -PE Performs the ping scan by using ‘ICMP Echo requests’ against the target. –packet-trace Shows all packets sent and received --reasonDisplays the reason for specific result. --top-ports=10Scans the specified top ports that have been defined as most frequent....
rpc enumeration
RPC Client RPC client $ rpcclient -U "" 10.129.14.128Enter WORKGROUP\'s password: rpcclient$> rpcclient$> srvinfo DEVSMB Wk Sv PrQ Unx NT SNT DEVSM platform_id : 500 os version : 6.1 server type : 0x809a03 rpcclient$> enumdomainsname:[DEVSMB] idx:[0x0] name:[Builtin] idx:[0x1] rpcclient$> querydominfoDomain: DEVOPS Server: DEVSMB Comment: DEVSM Total Users: 2 Total Groups: 0 Total Aliases: 0 Sequence No: 1632361158 Force Logoff: -1 Domain Server State: 0x1 Server Role: ROLE_DOMAIN_PDC Unknown 3: 0x1 rpcclient$> netshareenumallnetname: print$ remark: Printer Drivers path: C:\var\lib\samba\printers password: netname: home remark: INFREIGHT Samba path: C:\home\ password: netname: dev remark: DEVenv path: C:\home\sambauser\dev\ password: netname: notes remark: CheckIT path: C:\mnt\notes\ password: netname: IPC$ remark: IPC Service (DEVSM) path: C:\tmp password: rpcclient$> netsharegetinfo notesnetname: notes remark: CheckIT path: C:\mnt\notes\ password: type: 0x0 perms: 0 max_uses: -1 num_uses: 1 revision: 1 type: 0x8004: SEC_DESC_DACL_PRESENT SEC_DESC_SELF_RELATIVE DACL ACL Num ACEs: 1 revision: 2 --- ACE type: ACCESS ALLOWED (0) flags: 0x00 Specific bits: 0x1ff Permissions: 0x101f01ff: Generic all access SYNCHRONIZE_ACCESS WRITE_OWNER_ACCESS WRITE_DAC_ACCESS READ_CONTROL_ACCESS DELETE_ACCESS SID: S-1-1-0 rpcclient$> enumdomusersuser:[mrb3n] rid:[0x3e8] user:[cry0l1t3] rid:[0x3e9] rpcclient$> queryuser 0x3e9 User Name : cry0l1t3 Full Name : cry0l1t3 Home Drive : \\devsmb\cry0l1t3 Dir Drive : Profile Path: \\devsmb\cry0l1t3\profile Logon Script: Description : Workstations: Comment : Remote Dial : Logon Time : Do, 01 Jan 1970 01:00:00 CET Logoff Time : Mi, 06 Feb 2036 16:06:39 CET Kickoff Time : Mi, 06 Feb 2036 16:06:39 CET Password last set Time : Mi, 22 Sep 2021 17:50:56 CEST Password can change Time : Mi, 22 Sep 2021 17:50:56 CEST Password must change Time: Do, 14 Sep 30828 04:48:05 CEST unknown_2[0....
Samba enumeration
Samba samba $ cat /etc/samba/smb.conf | grep -v "#\|\;"[global] workgroup = DEV.INFREIGHT.HTB server string = DEVSMB log file = /var/log/samba/log.%m max log size = 1000 logging = file panic action = /usr/share/samba/panic-action %d server role = standalone server obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user usershare allow guests = yes [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no 設定 説明 [sharename] ネットワーク共有の名前。 workgroup = WORKGROUP/DOMAIN クライアントがクエリを実行したときに表示されるワークグループ。 path = /path/here/ ユーザーにアクセス権を付与するディレクトリ。 server string = STRING 接続が開始されたときに表示される文字列。 unix password sync = yes UNIX パスワードを SMB パスワードと同期しますか?...
SMTP enumeration
SMTP SMTP 送信と通信は、SMTP サーバーにユーザーの要求を実行させる特別なコマンドによっても行われます。 指示 説明 AUTH PLAIN AUTH は、クライアントの認証に使用されるサービス拡張です。 HELO クライアントはそのコンピューター名でログインし、セッションを開始します。 MAIL FROM クライアントは電子メールの送信者に名前を付けます。 RCPT TO クライアントは、電子メールの受信者に名前を付けます。 DATA クライアントが電子メールの送信を開始します。 RSET クライアントは開始された送信を中止しますが、クライアントとサーバー間の接続は維持します。 VRFY クライアントは、メールボックスがメッセージ転送に使用できるかどうかを確認します。 EXPN クライアントは、このコマンドでメールボックスがメッセージングに使用できるかどうかも確認します。 NOOP クライアントは、タイムアウトによる切断を防ぐために、サーバーに応答を要求します。 QUIT クライアントはセッションを終了します。 $ telnet 10.129.14.128 25 Trying 10.129.14.128... Connected to 10.129.14.128. Escape character is '^]'. 220 ESMTP Server HELO mail1.inlanefreight.htb 250 mail1.inlanefreight.htb EHLO mail1 250-mail1.inlanefreight.htb 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING $ telnet 10.129.14.128 25 Trying 10.129.14.128... Connected to 10....
[Note] How to build v8 for AFL
I built v8 to run fuzzing in AFL. First, install depot_tools using the link below. And then download the v8 source code. https://v8.dev/docs/source-code Next, create an afl directory in the v8/third_party directory and download the contents of the following link. https://chromium.googlesource.com/chromium/src/+/refs/heads/master/third_party/afl/ Next, go to the v8 directory and execute the following command. gn gen out/libfuzzer '--args=use_afl=true is_asan=true optimize_for_fuzzing = true ' --check ninja -C out/libfuzzer d8 afl-fuzz -D -i third_party/afl/src/testcases/others/js/ -o fuzzout -M fuzz1 ....
twintについて使ってみる
Twint について使ってみる(初級編) 何をするにも現代人はすぐにTwintterに情報を投稿する。 それはそれで良いのだが、ごくまれにどのような情報を投稿しているか・フォロー/フォロワーは・たくさんRTしている人は誰かなんとなく調べたくなってしまう時がある。 Twitterに連絡してのAPI利用許可を貰えばいいだろうと思うが、昔と違い今はAPI申請も難しくなっている(ぶっちゃけ面倒) そんなわけでどうにかしてAPIを使わずにTwitterの情報を集めるツールがないか探したところTwintに出会った。 特定のユーザーからツイートを収集したり、特定のトピック、ハッシュタグやトレンドに関連するツイートを収集することができる(ツイート取得3,200件の壁はあるものの) しかもプロキシ使い放題とは流石だ(未検証) そんなわけで今回はTwintを利用するところまでを紹介する。 インストール GitHubに書かれている内容そのままで簡単にインストールできる。 pipでインストール pip3 install twint 使ってみる 対象ユーザの最近のツイートとフォロワーをcsvファイルにしてみる。 今回は私のスクリーンネームFAMASoonで検索してみる。 import twint def get_followers(username): c = twint.Config() c.Username = username c.Profile_full = True c.Store_csv = True c.Output = "recent_followers.csv" twint.run.Followers(c) def get_recent_tweets(username): c = twint.Config() c.Username = username c.Store_csv = True c.Output = "recent_tweets.csv" twint.run.Search(c) def main(): # ここに任意のスクリーンネームを入力 user_name = "FAMASoon" get_recent_tweets(user_name) get_followers(user_name) if __name__ == "__main__": main() recent_followers.csvやrecent_tweets.csvという名前でフォロワーやツイートがリストアップされているだろう。 所感 結構簡単に使えた。 特定ユーザの動向をヲチするときとかに使えそう。
How to use crashwalk
How to use crashwalk crashwalk can check to quickly determine which crashes may lead to exploitable or not. Install Install gdb and golang by apt Download exploitable.py Install crashwalk $ sudo apt install gdb golang $ mkdir ~/src $ cd ~/src $ git clone https://github.com/jfoote/exploitable $ go get -u github.com/bnagy/crashwalk/cmd/... Usage crashwalk can be used immediately if there is a path of AFL crash outputs. For example, I will show using crashwalk on ....
Jupyter Notebook の導入
Jupyter Notebook の導入 はじめに Mac を買ったので新しく環境構築しました。 その際に行った作業のメモです。 Jupyter Notebook とは Python の対話的な実行環境のこと。 コードの共有や結果の可視化が楽にできます。 Markdownでメモを添えることもできます、便利ですね。 実はPython 以外も扱えます。 詳細は公式を見てください。 インストール Jupyter Notebook pip3 install jupyter で簡単にインストールできます。 Jupyter extension これだけでも便利ですが、さらに便利にできる拡張機能群があるのでインストールします。 ソースコードはここ pip3 install jupyter_contrib_nbextensions jupyter contrib nbextension install --user これで拡張機能が使えるようになりました。 http://localhost:8888/nbextensions で拡張機能を選択できるようになっています。 ちなみに自分はVimのキーバインドを使うために"Select CodeMirror Keymap"を、コードの展開とかを良い感じにやってくれる"Codefolding"と"Codefolding in Editor"を使っています。 jupyter-themes 少し暗めの色が好きなのでテーマカラーを変更できる jupyter-themes をインストールしてみます。 pip3 install jupyterthemes jt -t oceans16 -T -N これでテーマを変更することができました。 今回はoceans16を選択したが他にもテーマはあります。 下記コマンドで使用可能なテーマがリストとして出力されます。 jt -l お好みのテーマを選んでみてください。 おわりに Jupyter Notebook の環境構築をやってみました。 本当に便利なので使う人増えて欲しいですね。 何か良い拡張機能を知っている方は良ければ教えてください。
Malware Analysis links
I published a collection of links related to malware analysis. Please use it. Best Regards :) Links Tracker Haruko MalwareBazaar CyberCrime Tracker VXvault AZORult Tracker CCAM CyberCrime Tracker ATM CyberCrime Tracker Feodo Tracker URLhaus viriback RAT Tracker C2 Panel Tracker INQUEST LABS Source MALWARE-TRAFFIC-ANALYSIS.NET Twitter IoC Sandbox/Analyzer manalyzer VirusTotal Any.Run RE techniques THISISSECURITY XyliBox Fumik0_’s box MalwareTech Malware don’t need coffee nao_sec ZEROPHAGE SentinelLABS blog 0ffset MalwareLab.pl Research Notes Malware Reversing Encyclopedia malpedia ATT&CK Report APT_REPORT CyberThreatIntel Community OTX VirusBay kernelmode....