Week 7 - Web Attacks Part 1
简单介绍web攻击
Intro
我们会介绍这些攻击和预防:
Authentication Failure
SQL Injuction
Cross-site scripting (XSS)
Cross-site request forgery
Code injection
Authentication - Cookie
一般有三种身份验证方案:
IP Based:不可行,因为IPV4的NAT和DHCP
Certificate-based: 不可行,谁去签?
Cookie based:最常用
Cookies
用户第一次访问服务器的时候,服务器会在response中写Set-Cookie: xxxx,这样你下一次的请求体中就会带上Cookie: xxxxxx
由于Cookie中包含了身份认证信息,窃听者可以窃取你的Cookie,伪装成你。
解决方法:用TLS,设置cookie的session time out。
SQL Injucdtion
解决方法: use "prepared" statements
Shell Injection
不仅仅是SQL,Shell也可以被注入。
Last updated
Was this helpful?