我们如何防止 Java 应用程序中的帧注入?
就像在渗透测试中一样,发现如果黑客起草了一个演示 html 页面,并且在该页面中他使用了 iframe,其中包含工作应用程序的 URL,他/她可以通过该 URL/请求看到数据(在 iframe 中创建)。
假设这是黑客文件 test.html:
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head><body>
<iframe id="inner" src="http://hostname:8080/Application_Name/ABC/DEF/SomePage.jsp?ABC=QWERTYL&XYZ=1&CDE=24" width="600" height="400" scrolling="yes">
</iframe>
</body>
</html>
现在黑客能够在应用程序中检索数据。如何阻止这种情况?