ImageVerifierCode 换一换
格式:PPT , 页数:27 ,大小:1.74MB ,
资源ID:379376      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-379376.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(CATION FLAWS.ppt)为本站会员(unhappyhay135)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

CATION FLAWS.ppt

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

16、QL says “Sure, his name is too long Ill shorten it for you”,SQL Truncation Attacks,Slide 11,User=“adminx”,GEE THANKS,MSSQL Data is truncated when calling stored proceduresSQL returns record for adminData mailed to both admin and attacker,SQL Truncation Attacks,Slide 12,User=“;”,Create procedure Find

17、Userusername VARCHAR(100) .,Input To A Forgotten Password Page,Parameter Has A Length 100,Stored within the webroot /dbase/dbase.mdb Flat files etcRunning as ROOT or SYSTEM Or worse. A domain accountEncryption Of Data If the server or application is compromised, is the data?Unique record ID of the u

18、ser account User supplied password,Databases,Slide 13,Dont Use A Static Key,Do Seed With User Specific Data,Microsoft Used To Recommend This.,Encryption is difficult Do NOT roll your own XOR based encryption scheme BASE64 is not encryptionWeakness is in the implementation Verify your data is getting

19、 encrypted Use one way encryption for passwordsStoring the secrets Database credentials should never be stored clear text Encryption keys should not be stored in accessible configs,Cryptography,Slide 14,Often vulnerable to spam attacks SMTP is a text based protocol CR/LF pairs and new command can be

20、 insertedNormal communication with SMTP server,Application Email,Slide 15,Mail From: Rcpt To: Data Subject: This is a test email . quit,Injection through recipient field useruser.co.nz%0a%0drset%0a%0dMail From: spamfoo.Modified communication with SMTP server,Application Email,Slide 16,Mail From: Rcp

21、t To: rset Mail From: Rcpt To: Data Subject: This is a spam email blah blah spam spam . quit,RESET Injected,New Details Injected,The sending of user supplied input to the browser More than alert()Reflective Code passed as a parameter, usually on the URLPersistent Code stored and then displayed to us

22、erConsequences Cookie theft Site interaction Web application worms,Cross Site Scripting,Slide 17,JavaScript is a powerful programming language,Example flaw echo “hello “.$_GETusername.”welcome to the site”Normal output hello Brett welcome to the siteExploit output hello alert() welcome .,Cross Site

23、Scripting,Slide 18,Insert Any JavaScript Or Script Inclusion,Widely Known, Well Explained, Still Exists In Most Applications,Cross Site Request Forgery Attacking site causes browser to make a request to targetUser logs into banking.co.nz banking.co.nz sets an authentication cookie User leaves but do

24、esnt log outUser browses to attacking site Attacking site creates a post to banking.co.nz Users browser sends cookie with post Browser is already authenticated,CSRF,Slide 19,Defence Each post must contain a random parameter value,CSRF,Slide 20,Site redirection User supplied input used as target page

25、Can be used in phishing and scam attacksPage inclusion User supplied input use as source for frame, iframe, image,Other Related Attacks,Slide 21,http:/ Still Do This In Versions Of OWA, “,External Content Displayed In Browser,Dont store credentials in the cookie Set-cookie: user=adminSet the cookie

26、path Specifies which part of the application the cookie is sent to,Cookie Security,Slide 22,This Sort Of Thing Still Happens!,http:/Application,Secured Blog Posting Section http:/Application/secure/login,Insecure General Section http:/Application/general/read,Requires Auth Cookie Set,If The Cookie P

27、ath Is Not Set A Vulnerability In The General Section Can Read The Secure Section Cookie,Set the SECURE flag Prevents the cookie been sent in HTTP requests Cookie sent even if target site not listening on HTTPSet the HTTPOnly Flag Prevents access to the cookie through JavaScript Defence against cros

28、s site scripting,Cookie Security,Slide 23,Attacker Needs Access To Sniff The Traffic,File uploading is dangerous Provides the ability for the user to create data on server Usual attacks involve uploading a script file for accessCheck the file extension Check the portion after the last . Compare agai

29、nst WHITELISTCheck the file data Valid graphic, csv, numeric dataStore as blob in database Do NOT store as raw file under webroot,File Uploading,Slide 24,Beware The NULL (%00) byte,Local file include Occurs when user can affect or supply a file path Leads to disclosure of source and other sensitive

30、itemsRemote file include Occurs in PHP (usually), when an HTTP reference is provided Is disabled in modern versions of PHP.Net LoadControl Can be used to load arbitrary controls that exist on serverIf you must accept paths from a user Reject anything that is suspect. Ie; / %xx,File Include Attacks,Slide 25,http:/ is wrong with these?,Configuration,Slide 26,order deny,allowdeny from allallow from 203.10.1.104allow from 192.168.1.1 ,.htaccess,Web.config,,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1