Wildcards Spare tricks
chown, chmod
残りのファイルにコピーしたいファイルの所有者と権限を示すことができます
Tar
任意のコマンドを実行する:
You can exploit this using https://github.com/localh0t/wildpwn/blob/master/wildpwn.py (tar attack) More info in https://www.exploit-db.com/papers/33930
Rsync
任意のコマンドを実行:
You can exploit this using https://github.com/localh0t/wildpwn/blob/master/wildpwn.py (rsync attack) More info in https://www.exploit-db.com/papers/33930
7z
In 7z even using --
before *
(note that --
means that the following input cannot treated as parameters, so just file paths in this case) you can cause an arbitrary error to read a file, so if a command like the following one is being executed by root:
そして、このコマンドが実行されているフォルダ内にファイルを作成できるため、@root.txt
というファイルと、ファイルを読み取りたいファイルへのシンボリックリンクである root.txt
ファイルを作成できます:
その後、7zが実行されると、それはroot.txt
を圧縮すべきファイルのリストを含むファイルとして扱います(@root.txt
の存在が示していること)そして7zがroot.txt
を読み取ると、/file/you/want/to/read
を読み取りますが、このファイルの内容がファイルのリストではないため、エラーが発生して内容が表示されます。
詳細はHackTheBoxのCTFのWrite-upsにあります。
Zip
任意のコマンドを実行:
Last updated