欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    CATION FLAWS.ppt

    • 资源ID:379376       资源大小:1.74MB        全文页数:27页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    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,,


    注意事项

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




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

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

    收起
    展开