网站编程漏洞清单
观看 SO 上线对我来说是一种很好的教育。 我想制作一份针对网站的各种漏洞和利用的清单,以及可以使用哪些编程技术来防御它们。
- 漏洞有哪些类别?
- 网站崩溃
- 闯入服务器
- 侵入其他人的登录信息
- 垃圾邮件
- sockpuppeting,肉傀儡
- 等等...
- 什么样的防御性编程技术?
- ETC...
Watching SO come online has been quite an education for me. I'd like to make a checklist of various vunerabilities and exploits used against web sites, and what programming techniques can be used to defend against them.
- What categories of vunerabilities?
- crashing site
- breaking into server
- breaking into other people's logins
- spam
- sockpuppeting, meatpuppeting
- etc...
- What kind of defensive programming techniques?
- etc...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
显然,测试每个字段是否存在漏洞:
mysql_real_escape_string
)HTML(通常是 XSS 的好兆头) 任何其他不是为搜索 对于无限循环(唯一可能真正杀死服务器的间接事物(如果很多人意外发现它))。
Obviously test every field for vulnerabilities:
mysql_real_escape_string
)Search for infinite loops (the only indirect thing (if a lot of people found it accidentally) that could kill a server really).
我赞同 OWASP 信息,因为它是一种宝贵的资源。 以下内容也可能令人感兴趣,特别是攻击模式:
I second the OWASP info as being a valuable resource. The following may be of interest as well, notably the attack patterns:
来自 开放 Web 应用程序安全项目:
排名前十的分别是:
From the Open Web Application Security Project:
The top ten are:
一些预防技术:
XSS
如果您从用户处获取任何参数/输入并计划输出它,无论是在日志中还是在网页中,请对其进行清理(删除/转义任何类似于 HTML、引号、javascript 的内容... ) 如果您在页面中打印当前 URI,请清理! 例如,即使打印 PHP_SELF 也是不安全的。 消毒! 反射型 XSS 主要来自未经清理的页面参数。
如果您从用户那里获取任何输入并保存或打印它,则在检测到任何危险/无效内容时警告他们并让他们重新输入。 IDS 非常适合检测(例如 PHPIDS)。然后在存储/打印之前进行清理。 然后,当您从存储/数据库打印某些内容时,请再次清理!
输入-> IDS/消毒 -> 商店-> 消毒-> 输出
在开发过程中使用代码扫描器来帮助发现潜在的易受攻击的代码。
XSRF
破坏性功能,即
删除帖子。 相反,仅
接受 POST 请求。 GET 使得黑客攻击变得更加容易。
推荐人以确保请求
来自您的网站不
工作。 欺骗并不难
推荐人。
SQL 注入
Some prevention techniques:
XSS
If you take any parameters/input from the user and ever plan on outputting it, whether in a log or a web page, sanitize it (strip/escape anything resembling HTML, quotes, javascript...) If you print the current URI of a page within itself, sanitize! Even printing PHP_SELF, for example, is unsafe. Sanitize! Reflective XSS comes mostly from unsanitized page parameters.
If you take any input from the user and save it or print it, warn them if anything dangerous/invalid is detected and have them re-input. an IDS is good for detection (such as PHPIDS.) Then sanitize before storage/printing. Then when you print something from storage/database, sanitize again!
Input -> IDS/sanitize -> store -> sanitize -> output
use a code scanner during development to help spot potentially vulnerable code.
XSRF
destructive functionality, i.e.
deleting a post. Instead, only
accept POST requests. GET makes it extra easy for hackery.
referrer to make sure the request
came from your site does not
work. It's not hard to spoof the
referrer.
SQL injection
您可以从 Security Compass 获得优秀的 Firefox 插件来测试多个缺陷和漏洞,例如 xss 和 sql 注入。 可惜它们不能在 Firefox 3.0 上运行。 我希望这些能尽快更新。
You can get good firefox addons to test multiple flaws and vulnerabilities like xss and sql injections from Security Compass. Too bad they doesn't work on firefox 3.0. I hope that those will be updated soon.
SQL注入
SQL injection
XSS(跨站脚本)攻击
XSS (Cross Site Scripting) Attacks
易于监督且易于修复:清理从客户端接收的数据。 检查诸如“;”之类的内容 可以帮助防止恶意代码被注入到您的应用程序中。
Easy to oversee and easy to fix: the sanitizing of data received from the client side. Checking for things such as ';' can help in preventing malicious code being injected into your application.
大家好,
一个很好的安全静态分析工具是 David Wheeler 编写的 FlawFinder。 它在寻找各种安全漏洞方面做得很好,
但是,它并不能取代让知识渊博的人阅读您的代码。 正如大卫在他的网页上所说,“拥有工具的傻瓜仍然是傻瓜!”
HTH。
干杯,
抢
G'day,
A good static analysis tool for security is FlawFinder written by David Wheeler. It does a good job looking for various security exploits,
However, it doesn't replace having a knowledgable someone read through your code. As David says on his web page, "A fool with a tool is still a fool!"
HTH.
cheers,
Rob