2018Web攻防训练营简单XXE漏洞代码编写1.file_get_content函数介绍2.php://input介绍3.simplexml_load_string函数介绍4.XML注入回显输出函数课程内容01file_get_content函数介绍file_get_content函数介绍file_get_contents()函数把整个文件读入一个字符串中。02php://input介绍php://input介绍php://input是个可以访问请求的原始数据的只读流。结合file_get_contents(“php://input”)可以读取POST提交的数据。案例说明:输出POST提交的内容。03simplexml_load_string函数介绍simplexml_load_string函数介绍php中的simplexml_load_string函数将xml格式字符串转换为对应的SimpleXMLElement例如:$note=<<ToveJaniReminderDon'tforgetmethisweekend!XML;$xml=simplexml_load_string($note);print_r($xml);04XML注入回显输出函数XML注入回显输出函数在PHP中可以使用print_r()、echo输出想要输出的内容。给出完整存在XXE漏洞代码:";print_r($data);//注释掉该语句即为无回显的情况?>读取本地文件Payload:]>&xxe;1.file_get_content函数介绍2.php://input介绍3.simplexml_load_string函数介绍4.XML注入回显输出函数总结再见欢迎关注Web安全训练营课程