CATION FLAWS.ppt
《CATION FLAWS.ppt》由会员分享,可在线阅读,更多相关《CATION FLAWS.ppt(27页珍藏版)》请在麦多课文档分享上搜索。
1、CATION FLAWS,COMMON APPLI,Objective Provide an overview of common application flaws No exploitation techniques Discussion based, to provide an understanding To provoke thinkingOriginally going to provide a Tokemon walkthrough Wont work over conference call,Back To Basics,Slide 2,Cross Site Scripting
2、 alert()Injection Flaws SQL, LDAP, XML, etc File Execution Scripting, RFI, shell executionDirect Object Reference /access.asp?record=#Cross Site Request Forgery Session riding, Accessing internal device,OWASP Top Ten Summary,Slide 3,Information Leakage and Error Handling Every bit of information hel
3、ps an attackerBroken Authentication and Session Management Login bypass, cookie manipulationInsecure Cryptographic Storage Static keys, Non seeded encryptionInsecure Communications HTTP, Clear text internal web servicesFailure to Restrict URL Access /adminportal/adminfunction?action=adduser&user=me,
4、OWASP Top Ten Summary,Slide 4,Comes from many places Passed on the URL, or as a parameter Passed in posted data, hidden fields Passed in HTTP headers, referer Cookie data, client certificates, files for import, etc,User Supplied Input Is The Cause,Slide 5,THE USER CAN NOT BE TRUSTED. EVER,Validate A
5、LL user input, server side Cint(), isDate(), len() = x, isAlphaNumeric() Whitelist, NOT blacklist Decode input, in the correct order, and in the right case Filter Output at use Different uses of data, require different filters,function cleanrequest(theID)theID = lcase(theID)if instr(theID,“;“) 0 the
6、ntheID = left(theID,instr(theID,“;“)-1)end ifif instr(theID,“exec “) 0 thentheID = left(theID,instr(theID,“exec “)-1)end if,Faulty Filters Worse Than No Filters,Slide 6,Function To Filter User Input,Looks For The Use Of A Semi Colon,Looks For The Term exec followed by a space,This Filter Can Be Bypa
7、ssed By Using A Tab Character As A Separator /page.aspx?theID=1%09exec%09xp_cmdshell serverpwnage.exe;,/page.aspx?theID=1;exec xp_cmdshell serverpwnage.exe;,function displayText(htmlInput)htmlInput=str_ireplace(“script“, “,htmlInput)echo htmlInput,Faulty Filters Worse Than No Filters,Slide 7,Functio
8、n To Display User Input,Looks For The Term script And Remove It,Display The Filtered Data,These Types Of Filters Are Just Rubbish! /page.php?htmlInput=alert(),/page.php?htmlInput=alert(),Robots.txt / Sitemap.xml Often reveal more than they should Spiders dont have to obeyThings that dont belong Site
9、 archives .svn trees .inc, .cfg, .txt, bak, .backup Admin portals hidden paths Virtual sites,The Clean Server,Slide 8,Dont Want It Indexed? Dont Link It!,Dont Want It Found? Dont Put It There,http:/www.owasp.org/_admin/,http:/www.owasp.org/_database/,http:/www.owasp.org/_debug/,http:/www.owasp.org/_
10、debuglogs/,http:/www.owasp.org/_includes/,http:/www.owasp.org/admin/,http:/www.owasp.org/adminportal/,http:/www.owasp.org/adminsite/,http:/www.owasp.org/console/,http:/www.owasp.org/backups/,http:/www.owasp.org/logs/,http:/www.owasp.org/maintentance/,http:/www.owasp.org/sites/,http:/www.owasp.org/sy
11、sadmin/,http:/www.owasp.org/admin/admin.,http:/www.owasp.org/admin/admin.asp,http:/www.owasp.org/admin/admin.bak,http:/www.owasp.org/admin/admin.inc,http:/www.owasp.org/admin/admin.log,http:/www.owasp.org/admin/admin.jsp,http:/www.owasp.org/admin/admin.php,http:/www.owasp.org/admin/adminpage.,http:/
12、www.owasp.org/admin/adminpage.asp,http:/www.owasp.org/admin/adminpage.bak,http:/www.owasp.org/admin/adminpage.inc,http:/www.owasp.org/admin/adminpage.jsp,http:/www.owasp.org/admin/adminpage.php,Manipulation of the SQL query stringBecomesOr,SQL Injection,Slide 9,sqlString= select * from users where n
13、ame =+userinput+and password=+userinput,select * from users where name =admin;-and password=anything,select * from users where name =admin and password=anything or 1=1,Syntax Grouping,Where (name =admin) (and (password=anything) or (1=1) ),Syntax Grouping,Use parameterized queries asp, .net, java, p
14、hp, python, flex? Use stored procedures Type cast variables Dont use dynamic SQL inside procedure Often seen in search procedures Use the QuoteName function,SQL Injection,Slide 10,Yes. Of course your flash application can be vulnerable to injection attacks,DO NOT BUILD SQL STATEMENTS DYNAMICALLY,SEL
15、ECT SQL = SELECT * from USERS WHERE NAME =+ UsernameEXEC SQL,Application vs SQL The form data is stored varies between the twoMySQL MySQL will truncate data during an insertPHP asks MYSQL “Any users by this name?” MYSQL responds “No, I dont know that person” PHP says “Ok add a user by this name” MYS
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CATIONFLAWSPPT
