Application Security 之Authentication
Dictionary attack 字典攻击
A dictionary attack uses a targeted technique of successively trying all the words in an exhaustive list called a dictionary.
a dictionary attack tries only those possibilities which are most likely to
succeed, typically derived from a list of words for example a dictionary.
Generally, dictionary attacks succeed because many people have a tendency to
choose passwords which are short (7 characters or fewer), single words found in
dictionaries or simple, easily predicted variations on words, such as appending
a digit.
收集好密码可能包含的字符串,然后通过各种方式组合。即相当于从字典中查密码,逐一验证
字典文件(一个充满字典文字的文本文件)被装入破解应用程序(如L0phtCrack),它是根据由应用程序定位的用户帐户运行的。因为大多数密码通常是简单的,所以运行字典攻击通常足以实现目的了。
防御:
密码设长,设复杂,加特殊符号,不要设置为英文单词
Network Eavesdropping
network layer attack consisting of capturing packets from the network transmitted by others' computers and reading the data content in search of sensitive information like passwords, session tokens, or any kind of confidential information.
网络监听是一种监视网络状态、数据流程以及网络上信息传输的管理工具,它可以将网络界面设定成监听模式,并且可以截获网络上所传输的信息。也就是说,当黑客登录网络主机并取得超级用户权限后,若要登录其它主机,使用网络监听便可以有效地截获网络上的数据,这是黑客使用最好的方法。但是网络监听只能应用于连接同一网段的主机,通常被用来获取用户密码等。
网络监听是主机的一种工作模式,在这种模式下,主机可以接收到本网段在同一条物理信道上传输的所有信息,而不管信息的发送方和接受方是谁。所以进行通信的信息必须进行加密,否则只要使用一些网络监听工具就可以截获包括口令和账号在内的信息资料。大部分的传输介质如Ethernet、FDDI、Token-ring、模拟电话线、无线接入网上都可实施网络监听,其中尤以Ethernet与无线接入网最为容易,因为这两者都是典型的广播型网络。
Sniffer:
这种方法要求运行Sniffer程序的主机和被监听的主机在同一个以太网段上(信息必须流经监听机),故而在外部主机上运行Sniffer很难取得效果。同时,Sniffer程序必须以root身份使用才能监听到同以太网段上的数据流。Sniffer攻击原理示意图如图9-12所示。
大多数Sniffer程序在后台运行,将结果输出到某个记录文件中。黑客常常会修改ps程序,使系统管理员很难发现运行的Sniffer程序(如rootkit攻击工具)。Sniffer程序将系统的网络接口设定为混杂模式。这样,它就可以监听到所有流经同一以太网网段的数据包,不管它的接收者或发送者是不是运行Sniffer的主机。程序将用户名,密码和其他黑客感兴趣的数据存入log文件。黑客会等待一段时间(如一周后)回到这里来下载该log文件。
http://www.heibai.net/article/info/info.php?infoid=46459
防御:
使用安全工具查log,安装防火墙,对网络上传输的信息进行加密。
http://blog.sina.com.cn/s/blog_5d72b75e0100bigl.html
Cookie Replay
Essentially a security breach whereby someone poses as someone else using some unique piece of data the user supplied/was issued to/from the Web server. It’s kind of similar to a man-in-the-middle attack.
所谓重放攻击就是攻击者发送一个目的主机已接收过的包,来达到欺骗系统的目的,主要用于身份认证过程。攻击者利用网络监听或者其他方式盗取认证凭据,之后再把它重新发给认证服务器。
- John logs into example.org.
- Server issues John a cookie with value of 12345.
- John revisits example.org again and is logged in.
- Evil Joe looked at the request and steals the cookie.
- Joe visits example.org which logs him in as John.
Due to the very nature of the attack it isn’t possible to 100% protect against it, it’s inherently insecure. But there are ways to increase the security, and that’s to add another step after (3) above:
- Server reissues John a cookie with value of 67891.
It’s called token regeneration. We have recognised that John has a valid cookie, logged the user in, removed their old cookie and recreate a new one that no one else should know. Even if Joe had the old cookie it’s no longer valid and has to perform the same actions as (4) in the original way. 【产生新的cookie】
Another method is to add some kind of time restriction, so only make the cookie valid for a certain amount of days. So if Joe happens to stumble across the cookie after a month he should no longer be able to login as John. Another to add in which browser John is using, the chances of John using exactly the same as Joe is unlikely. But again it is possible, so don’t rely on it! 【增加时间限制】
sequence number也用于防御replay attack,When replay detection is enabled, sequence numbers are never reused because a new security association must be renegotiated before an attempt to increment the sequence number beyond its maximum value
http://www.chrisjhill.co.uk/article/cookie-replay-attack-protection
credential theft 身份盗窃
被身份盗窃的用户往往通过登陆钓鱼网站、挂马网站和打开垃圾邮件等暴露出自己的个人信息。
防御:
1、检测和清除数据窃取软件
恶意应用软件是身份盗窃的主要作恶工具,因为很多恶意软件比如间谍软件、键盘记录都被设计来记录传输至网络上的信息。犯罪分子会利用恶意软件、键盘记录工具或者间谍工具等来手机电脑上的用户名敏感数据。在后台运行。
2. 使用强密码并经常进行更换
3. 使用最新的支持加密功能的浏览器
使用内置有加密和钓鱼站点检测功能的浏览器变得很有必要
4. 不要在社交网站上过多透露个人信息
5. 使用身份盗窃保护服务