
自己完結型のhtaccessシェルと攻撃
HTSHELLS - 自己完結型のWebシェルや、.htaccessファイルを介したその他の攻撃
攻撃は module.attack.htaccess という形式で命名され、攻撃タイプごとにディレクトリにグループ化されています。必要なものを選び、新しいファイルにコピーして .htaccess という名前で保存し、アップロード前にファイルを確認して編集が必要かどうかチェックしてください。Webシェルは、ファイルに別途記載がない限り、クエリパラメータ c からコマンドを実行します。
準備として ./prepare.sh file を実行すると、アップロードする .htaccess ファイルが生成されます。例:
$ ./prepare.sh shell/mod_php.shell.htaccess
┬ ┬┌┬┐┌─┐┬ ┬┌─┐┬ ┬ ┌─┐
├─┤ │ └─┐├─┤├┤ │ │ └─┐
┴ ┴ ┴ └─┘┴ ┴└─┘┴─┘┴─┘└─┘
justanotherhacker.com
.htaccess file is ready
$ curl -F '[email protected]' -k https://target/upload.php
$ curl -k https://target/uploads/.htaccess?c=id
...
# uid=33(www-data) gid=33(www-data) groups=33(www-data)
== DOS/ # サービス拒否攻撃
apache.dos.htaccess すべてのリクエストが500内部サーバーエラーを返すようにする
mod_rewrite.dos.htaccess mod_rewriteの正規表現DoS条件により子プロセスを消費する
== INFO/ # 情報漏洩攻撃
modcheck/ アクティブなApacheモジュールを示す追加の応答ヘッダーを含める
mod_caucho.info.htaccess untested mod_caucho Resin Javaサーバーモジュールのサーバーステータスバインディング
mod_clamav.info.htaccess Clamavステータスページのバインディング
mod_info.info.htaccess Apacheのサーバー情報バインディング
mod_ldap.info.htaccess untested mod_ldapサーバーモジュールのサーバーステータスバインディング
mod_perl.info.htaccess mod_perlステータスページの表示
mod_php.info.htaccess すべてのphpページを実行せずにソースを表示する
mod_status.info.htacces Apacheのサーバーステータスバインディング
== SHELL/ # 対話的なコマンド実行
mod_caucho.shell.htaccess untested JSPベースのWebシェル
mod_cgi.shell.bash.htaccess CGIハンドラによるbashを使用したシェル。htaccessファイルに実行フラグを設定する必要があります。
mod_cgi.shell.windows.htaccess untested Apache CGI設定ディレクティブを介したphp.exeによるシェル
mod_include.shell.htaccess サーバーサイドインクルードベースのWebシェル
mod_multi.shell.htaccess 1つの.htaccessファイルに複数のシェルを内包、オールインワンアプローチ
mod_perl.shell.htaccess incomplete TODO
mod_php.shell.htaccess PHPベースのWebシェルアクセス http://domain/path/.htaccess?c=command
mod_php.shell2.htaccess .htaccessファイルからPHPシェルを呼び出す代替手法
mod_php.stealth.shell.htaccess PHPベースのステルスバックドア - チュートリアルは http://www.justanotherhacker.com/2011/12/writing-a-stealth-web-shell.html を参照
mod_python.shell.htaccess
mod_ruby.shell.htaccess
mod_suphp.shell.htaccess
== TRAVERSAL/ # ディレクトリトラバーサル攻撃
mod_hitlog.traversal.htaccess hitlogモジュールを介したディレクトリトラバーサル攻撃で /etc/passwd を読み取ろうとする
mod_layout.traversal.htaccess ディレクトリトラバーサル攻撃で /etc/passwd を読み取る
== ./ # さまざまな攻撃
mod_auth_remote.phish.htaccess untested Basic認証の資格情報を任意のサーバーに転送する
mod_badge.admin.htaccess mod_badge 管理ページのバインディング
mod_sendmail.rce.htaccess untested .htaccessファイルで設定されたコマンドを、"sendmail"バイナリへのパスと引数を指定して実行する
Wireghoul - http://www.justanotherhacker.com