Đồ án: Nghiên cứu ứng dụng modsecurity để bảo vệ web server

84 208 1
Đồ án: Nghiên cứu ứng dụng modsecurity để bảo vệ web server

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Các firewall truyền thống không đủ mạnh để để bảo vệ các web server. ModSecurity cho phép bảo vệ web server (một trên nhiều) thông qua cơ chế can thiệp trực tiếp ở mức độ ứng dụng. Đồ án này nhằm nghiên cứu và ứng dụng ModSecurity để bảo vệ hệ thống web bất kỳ.

DRAFT1 minhtamnw@gmail.com MỤC LỤC I PHIẾU GIAO ĐỀTÀI Tên đề án: Nghiên cứu ứng dụng Mod Security để bảo vệ web server Người hướng dẫn: Lưu Thanh Trà Thời gian thực hiện: 14 tuần Số lượng SV I Mục đích Các firewall truyền thống khơng đủ mạnh để để bảo vệ web server ModSecurity cho phép bảo vệ web server (một/nhiều) thông qua chế can thiệp trực tiếp mức độ ứng dụng Đồ án nhằm nghiên cứu ứng dụng ModSecurity để bảo vệ hệ thống web II II Yêu cầu sinh viên thực  Sinh viên có kiến thức Linux, web  Sinh viên có kiến thức security, html, lập trình web III yêu cầu  Sinh viên nắm rõ hoạt động hệ điều hành Linux  Sinh viên nắm rõ web, html, http, PhP IV Sản phẩm  Hệ thống Mod Security triển khai hoàn chỉnh để bảo vệ hệ thống web V Tài liệu tham khảo Các giáo trình giảng viên đề nghị, Internet Ngày 28 tháng 02 năm 2013 Ký tên TS Lưu Thanh Trà II NHẬP ĐỀ Ngày nay, ứng dụng web doanh nghiệp quan phủ phải đối mặt với hai thách thức lớn là: giảm thiểu nguy bảo mật bảo đảm quy trình cơng nghiệp và/hoặc quy định phủ May mắn thay tồn giải pháp an tồn thơng tin sẵn sàng hỗ trợ tổ chức CNTT đạt hai tiêu chí thời điểm OWASP cho phép chuyên gia an ninh CNTT giảm thiểu công chủ động liên tục củng cố cấu hình cấu hình an ninh OS, ứng dụng web Web Application Firewall Đồng thời, dự án thuộc chuẩn OWASP cho phép kiểm soát viên giám sát việc tuân thủ sách bắt buộc tổ chức, doanh nghiệp ModSecurity sản phẩm thuộc dự án OWASP, cho phép người dùng cấu hình, tùy chỉnh phương thức phát công vào web server Phiên ModSecurity hỗ trợ Apache, Nginx IIS Cùng với dự án ModSecurity Core Rule Set việc triển khai hệ thống WAF dễ dàng cho nhân viên hệ thống chuyên viên bảo mật III IV GIỚI THIỆU MOD_SECURITY Mod_Security module mở rộng cho chương trình web server Apache, Nginx, IIS hoạt động firewall lớp ứng dụng web Cùng với gia tăng phương pháp cơng web mod_security cập nhật rule đưa nhiều cách phịng chống mã nguồn chương trình Một số tính chất mà mod_security dùng làm Web Application Firewall: Tính linh động (Flexibility) Việc phân tích luồng HTTP theo tiêu chí định thực tế thường gặp vấn đề để so trùng mẫu mà bạn muốn Ngoài ra, nhu cầu hệ thống web khác dẫn đến việc phân tích loại ứng dụng khác Mod_security kết hợp với OWASP phát triển tập rule mẫu (Core Rule Set) nhằm tạo tính linh động cho mơ hình web khác nhau, hỗ trợ người quản trị phân tích theo nhu cầu thực tế hệ thống quản trị Tính thụ động (Passivity) ModSecurity không thực thi tác vụ người quản trị viên không định cơng việc cụ thể cho chương trình, việc quan trọng ứng dụng có nhiệm vụ phân tích nguy ModSecurity Mọi cảnh báo thực thơng qua chế phân tích định tương tác với hệ thống người quản trị thực CHỨC NĂNG ModSecurity hoạt động với chương trình web server (ví dụ: Apache) thực tác vụ sau: Parsing ModSecurity phân tách liệu luân chuyển qua hệ thống thành cấu trúc liệu mà ModSecurity định nghĩa sẵn Cấu trúc chuyển qua chế so trùng mẫu tập rule để phân tích nguy Buffering Chức buffer (đệm) đóng vai trị quan trọng chế hoạt động ModSec Việc có ý nghĩa request gởi đến ứng dụng web phải thông qua ModSecurity trước đến ứng dụng xử lý response phân tích trước trả phía client Cơ chế cách để ngăn chặn công thời gian thực, liệu mà ModSecurity nhận phân tích lưu trữ RAM (bao gồm request body response data) Logging ModSecurity hỗ trợ ghi nhật ký gói tin HTTP: request headers, request body, response header, response body nhằm hỗ trợ người quản trị phân tích nguy mà hệ thống gặp phải để định kiểm sốt Rule Engine Các tập mẫu ModSecurity đóng vai trò quan trọng việc phát dạng cơng thực phịng chống ModSecurity phát triển với dự án OWASP phát triển mẫu để phân tích phịng chống cơng hệ thống web (Tham khảo https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project) Các phân nhóm mà CRS hỗ trợ: • • • • • • • • • • • HTTP Protection Real-time Blacklist Lookups Web-based Malware Detection HTTP Denial of Service Protections Common Web Attacks Protection Automation Detection Integration with AV Scanning for File Uploads Tracking Sensitive Data Trojan Protection Identification of Application Defects Error Detection and Hiding CẤU TRÚC RULE TRONG ModSecurity Tất hoạt động ModSecurity hầu hết liên quan đến hai phần là: cấu hình (configuration) tập luật (rule) Phần cấu hình định cách thức xử lý liệu, rule định thực hành vi (action) với liệu xử lý Một ví dụ rule: SecRule ARGS "" log,deny,status:404 Cấu trúc chuẩn rule ModSecurity bao gồm phần chính: SecRule VARIABLES OPERATOR ACTIONS VARIABLES: xác định vị trí liệu mà ModSecurity tìm kiếm mẫu Trong ví dụ trên, tham số ARGS nhằm định tìm kiếm mẫu tất tham số request OPERATOR: định cách mà ModSecurity tìm kiếm mẫu Các operator dùng theo dạng Regular expression nhằm tạo nên chế phân tích linh động cho rule ACTIONS: định hành động mà ModSecurity thực có mẫu so trùng Trong ví dụ trên, phần action viết log,deny,status:404 có nghĩa là: trùng mẫu gói tin thực ghi log, deny gói tin cách sử dụng mã trạng thái 404 (Not found) QUY TRÌNH XỬ LÝ TRONG ModSecurity Trong ModSecurity phiên phân tích thực qua bước (pha), bước ModSecurity thực thi rule tương ứng nhằm phát phịng chống khai thác Hình 1: Quy trình xử lý ModSecurity (nguồn www.Modsecurity.org) Request Header (1) Đây bước trình thực phân tích gói tin Mục đích bước nhằm cho phép người viết rule tương tác với request trước thực yêu cầu phần HTTP body Phần quan trọng để phân tích khai thác dựa vào HTTP method dựa vào URL SQL Injection, Reflect XSS, Local file include … Request body (2) Bước trình kiểm tra q trình client gởi request đến server, phần có hiệu người dùng cố sử dụng phương thức POST PUT để upload tập tin lên phía server Việc kiểm tra bảo đảm liệu đưa lên server an tồn, tránh tình trạng upload mã độc dạng công Stored XSS, Ajax Injection … Response headers (3) Những request xử lý server trả cho ModSecurity kiểm tra trạng thái phần respone header Trước phần respone body đọc ModSecurity dựa vào tập rule để xác định có cần kiểm tra nội dung liệu phần body hay khơng Ví dụ: mã trạng thái trả 404 (Not found) lúc khơng cần kiểm tra nội dung gói tin trả Response body (4) Sau ModSecurity hoàn thành việc kiểm tra respone header nội dung phần body kiểm tra so trùng với mẫu tập lệnh Việc hiệu để phát phòng chống xâm nhập trường hợp bước không phát cơng Ví dụ: khai thác SQL injection, hacker cố gắng sử dụng số công nghệ evasion việc phát request khó khăn Khi khai thác thành cơng, ModSecurity phân tích kết gói tin trả để phát câu truy vấn thành công Logging (5) Việc ghi log ghi nhận cảnh báo quy trình làm việc ModSecurity KHUYẾN CÁO KHI TRIỂN KHAI THỰC TẾ Nhằm bảo đảm tính tính linh động việc phát bảo vệ theo thời gian thực, ModSecurity cần sử dụng lượng tài nguyên CPU RAM để bảo đảm hoạt động mục đích triển khai Việc sử dụng tài nguyên phụ thuộc nhiều vào phần cấu hình cách triển khai hệ thống khác Dưới dây số điểm cần ý: ModSecurity phân tích cú pháp mà apache thực hiện, hệ thống bạn tăng tiêu thụ tài nguyên CPU để thực tác vụ Việc phân tích linh động số trường hợp cần lượng tài nguyên lớn để phân tích Ví dụ: XML, JSON, AJAX … Việc quản lý liệu upload từ phía client yêu cầu thêm tài nguyên I/O (như HDD), số trường hợp gây tình trạng trùng lặp liệu hệ thống Dữ liệu request resopone lưu trữ đệm RAM để thực tác vụ chặn theo thời gian thực Mỗi rule phần cấu hình sử dụng CPU (cho phần operartor) RAM (dùng để chuyển đổi liệu đầu vào trước qua phiên phân tích) Việc sử dụng Regular expression tốn tài nguyên nhiều Các hoạt động I/O tăng cao cho việc ghi nhật ký trình hoạt động ModSecurity (full transaction loging) Khi triển khai thực tế ModSecurity, bạn cần ý đến điều để xác định tài nguyên cần thiết để ModSecurity hoạt động ổn định Trong trường hợp bạn khơng thể thay đổi tài ngun phần cứng, tơi khuyên bạn nên thường xuyên theo dõi trạng thái hoạt động hệ thống, rút kinh nghiệm nhằm điều chỉnh giảm bớt chức năng, ruleset phù hợp mà đảm bảo an toàn cho việc hoạt động Nếu tổ chức mà bạn quản lý sử dụng số cơng nghệ ảo hóa việc điều chỉnh tài nguyên thuận tiện để ModSecurity hoạt động Một cách khác để triển khai ModSecurity thực dùng reverse proxy, trường hợp tài nguyên cho ModSecurity ổn định so với hệ thống tích hợp (CPU, RAM, I/O hoạt động trạng thái cao) V TỐNG QUAN VỀ TIÊU CHUẨN OWASP TOP TEN OWASP (Open Web Application Security Project) dự án phi lợi nhuận, tập trung vào việc cải thiện tính bảo mật ứng dụng web Thành viên dự án cá nhân, tổ chức, chuyên gia … đóng góp mã nguồn, công cụ hỗ trợ kiểm tra lỗ hổng ứng dụng web Năm 2010, cộng đồng OWASP xuất “Tài liệu hướng dẫn kiểm tra ứng dụng Web” phiên (OWASP Testing Guide v3: https://www.owasp.org/index.php/OWASP_Testing_Project) Tài liệu liệt kê phân nhóm lỗ hổng bảo mật biết đến ứng dụng web Đồng thời nội dung tài liệu mô tả dự án cộng đồng phát triển, bao gồm dự án WAF ModSecurity OWASP phân loại lỗ hổng thành 10 phân nhóm chính: A1-Injection A2-Cross Site Scripting (XSS) A3-Broken Authentication and Session Management A4-Insecure Direct Object References A5-Cross Site Request Forgery (CSRF) A6-Security Misconfiguration A7-Insecure Cryptographic Storage A8-Failure to Restrict URL Access A9-Insufficient Transport Layer Protection A10-Unvalidated Redirects and Forwards Dự án OWASP ModSecurity Core Rule Set (CRS) sử dụng quyền ASLv2 Các tập rule CRS phân loại theo tiêu chuẩn OWASP để bảo vệ máy chủ web theo loại công Các rule hoạt động tốt với phiên ModSecurity 2.5 trở lên Các vấn đề triển khai ModSecurity CRS phương pháp kiểm tra lỗ hổng sau triển khai, bạn tham khảo mục OWASP MODSECURITY CORE RULE SET PHỤ LỤC VI CÀI ĐẶT MODSECURITY Trước bạn tiến hành cài đặt ModSecurity cho hệ thống, bạn cần biết phương thức cài đặt số ưu điểm khuyết điểm cho loại: CÁCH CÀI ĐẶT Dựa vào phiên hệ điều hành ƯU ĐIỂM • Tự động cài đặt • Dễ dàng bảo trì NHƯỢC ĐIỂM • Có thể phiên cũ Gói cài đặt bên thứ • Tự động cài đặt • Có thể phiên cũ • Yêu cầu tải cập nhật ba thường xun • Khơng tin tưởng vào gói cài đặt đóng gói Cài đặt từ mã nguồn • Bảo đảm phiên • Có thể sử dụng phiên thử nghiệm • Có thể tùy biến, sử dụng vá khẩn cấp tình phát lỗi bảo mật • Có thể gặp vấn đề quản trị viên muốn sử dụng lại phiên cũ trước Trong phần này, tơi hướng dẫn biên dịch từ mã nguồn ModSecurity tải trang web www.Modsecurity.org Trước cài đặt ModSecurity tảng Linux, bạn cần cài đặt số thư viện hỗ trợ sau: Apache Portable Runtime (APR), APR-util, bật module mod_unique_id Apache, libcurl, libxml2, Lua 5.1 (tùy chọn), PCRE # yum install openssl openssl-devel pcre pcre-devel libxml2 libxml2-devel curl-devel pcre pcre-devel Tải phiên ModSecurity trang sản phẩm # wget http://www.Modsecurity.org/tarball/2.7.3/Modsecurity-apache_2.7.3.tar.gz # wget http://www.Modsecurity.org/tarball/2.7.3/Modsecurity-apache_2.7.3.tar.gz.md5 Kiểm tra gói tin tải Hình 2: Kiểm tra MD5 tập tin cài đặt # md5sum –c Modsecurity-apache_2.7.3.tar.gz.md5 Thực giải nén # tar xvf Modsecurity-apache_2.7.3.tar.gz # cd Modsecurity-apache_2.7.3 Biên dịch cài đặt chương trình # /configure 10 SM-002 SM-003 SM-004 SM-005 Testing for Cookies attributes Cookies are set not ‘HTTP Only’, ‘Secure’, and no time validity Testing for Session Fixation Session Fixation Cookies are set not ‘HTTP Onl y’, ‘Secure’, and no tim e validity Testing for Exposed Session Variables Exposed sensitive session variables Testing for CSRF - CSRF Expose d sensitive session va riables Session Fixation ";secure", HTTPOnly - Always set, "; domain=app.mysite.com", "; path=/myapp/", expires-Future Value => inspect for sensitive data The application doesn’t renew the cookie after auth -Session hijacking Webscarab Encryption & Reuse of Session Tokens vulnerabilities, Proxies & Caching vulnerabilities,TGET & POST vulnerabilities, Transport vulne rabilities CSRF URL Analysis and auth requirements 70 Webscarab,Bur pProxy,Paros, TamperIE/Data Authoriz ation Testing AZ-001 AZ-002 AZ-003 Testing for Path Tr Path Traversal aversal - Path Traversal Testing for bypassing authorization schema Bypassing authorization schema Testing for Privilege Escalation Privilege Escalation Proper Implementatio n of ACLs, Check server side includes Bypassi ng authori zation schema a) Input vector enumeration b) Testing Techniques dot-dot-slash attack ( /), directory traversal,directory climbing, or backtracking Access a resource without authentication/after logout, Forceful Browsing Privileg vertical escal Testing for role/privilege manipulati e Escalatio ation when it is o - Manipulate the values of hidden n possible to acce variables , analyse the error messages ss resources gr etc anted to more privileged acco unts (e.g., acquiring admi nistrative privil eges for the ap plication), and to horizontal es calation when i t is possible to access resource s 71 Grep, Nikto, Burp Suite, Paros, Webscarab Proxy Tools granted to a si milarly configu red account (e g., in an online banking applic ation, accessing information rel ated to a differ ent user) Business logic testing BL-001 Testing for Business Logic Bypassable business logic Bypassa Bypass the ble busine actual ss logic workflow required to complete a process *Understanding the application *Creating raw data for designing logica l tests (Workflows, ACLs) *Designing the logical tests *Standard prerequisites *Execution of logical tests Automated tools fails Data Validation Testing DV-001 Testing for Reflected Cross Site Scripting Reflected XSS Reflecte d XSS Detect input vectors Analyze each input vector to detect p otential vulnerabilities Replace the vector used to identify XSS with the vector which can exploit the vulnerability CAL9000, Rsnake XSSdb, XSSMe firefox addon, XSS proxy, WebScarab, Rat proxy, Burp Proxy Check for input validation, try out different combinations of XSS vectors 72 DV-002 Testing for Stored Cross Site Scripting - Stored XSS DV-003 Testing for DOM based Cross Site Scripting DOM XSS Stored XSS Impacts *Hijacking anot her user's brow ser *Capturing sen sitive informati on viewed by a pplication user s *Pseudo deface ment of the app lication *Port scanning of internal host s ("internal" in relation to the users of the we b application) *Directed deliv ery of browser‐ based exploits *Other malicio us activities DOM XS This S happens mostly due to poor javascript coding 73 1.Input Forms 2.Analyze HTML code 3.Leverage Stored XSS with BeEF 4.File Upload CAL9000, Hackvertor, XSSProxy, BeEF, WebScarab Test for the user inputs obtained from client‐side JavaScr ipt objects Automated tools fails DV-004 DV-005 Testing for Cross Site Flashing Cross Site Flashing SQL Injection SQL Injection Cross Si te Flashin g Working for actionscript 2.0 files 1.Decompile 2.Undefined Variables 3.Unsafe methods 4.Include malicious SWF SWFIntruder, Flare, Flasm SQL Inje 1.Inband ction (retrieved data in the webpage) 2.Out-of-band (data sent through email or other means) 3.Inferential (Analyse the behaviour of Dbserver) LDAP In jection Test Categories 1.Authentication Forms, 2.Search Engine, 3.E-Commerce sites OWASP SQLiX SQL Power Injector sqlbftools sqlmap SqlDumper sqlninja DV-006 LDAP Injection LDAP Injection DV-007 ORM ORM Inj Object Injection ection Relational ORM Injection Mapping tool ORM tools include 74 Tests 1.Heuristic Analysis(' , : , ) 2.Construct SQL Injection Vectors 3.Analyse Error Messages Ability to • Access unauthorized content • Evade Application restrictions • Gather unauthorized information • Add or modify Objects inside LDAP tree structure Black box testing for ORM Injection vulnerabilities is identical to SQL Injection testing Softerra LDAP Browser Hibernate for Java, NHibernate for NET, ActiveRecord for Ruby on Rails, EZPDO for PHP and many others DV-008 DV-009 DV-010 XML Injection XML Injection SSI Injection - SSI Injection XML Inj ection Check with XML Meta Characters ', " , , , &, , SSI Inje ction * Presense of shtml extension * Check for these characters < ! # = / " - > and [a-zA-Z0-9] * include String = XPath Injection XPath Injection XPath I njection Unlike SQL, there are not ACLs enforced, as our query can access every part of the XML document 75 * Check for XML error enumeration by supplying a single quote (') * Username: ' or '1' = '1 Password: ' or '1' = '1 Burp Suit, WebScarab, Paros DV-011 IMAP/SMT P Injection IMAP/SMTP Injection IMAP/S MTP Inject ion • Exploitation of vulnerabilities in the IMAP/SMTP protocol • Application restrictions evasion • Anti-automation process evasion • Information leaks • Relay/SPAM The standard attack patterns are: • Identifying vulnerable parameters • Understanding the data flow and deployment structure of the client • IMAP/SMTP command injection DV-012 DV-013 DV-014 Code Code Inj Injection ection Code Injection OS OS Com Commanding manding - OS Commanding Buffer Buffer o • Testing for overflow verflow heap overflow Buffer vulnerability overflow • Testing for stack overflow vulnerability • Testing for format string vulnerability 76 Enter commands in the input field Understand the application platform, OS, folder structure, relative path and execute those Webscarab OllyDbg, Spike, Brute Force Binary Tester (BFB), Metasploit RATS, Flawfinder and ITS4 are available for analyzing C-style languages DV-015 DV-016 Denial of Service Testing DS-001 Incubated vulnerability Incubated vulnerability Testing for HTTP Splitting/Smu ggling - HTTP Splitting, Smuggling Incubat ed vulnera bility Testing for SQL Wildcard Attacks - SQL Wildcard vulnerability SQL Wil • Starting dcard with % and vulnerabili ending with % ty will generally cause longer running queries • Some search implementatio ns may cache search results During the testing, every search query should be slightly different to avoid this HTTP S plitting, S muggling File Upload, Stored XSS , SQL/XPATH Injection, Manage server files via server misconfigs Outcome Cache Poisoning/XSS 77 param=foobar%0d%0aContentLength:%200%0d%0a%0d %0aHTTP/1.1%20200%20OK%0d %0aContentType:%20text/html%0d %0aContent-Length:%2035%0d %0a%0d%0aSorry, %20System%20Down • '%_[^!_%/%a?F%_D)_(F%)_%([)({} %){()}£$&N%_)$*£()$*R"_)][%](%[x]) %a][$*"£$-9]_%' • '%64_[^!_%65/%aa?F%64_D)_(F %64)_%36([)({}%33){()}£$&N%55_) $*£()$*R"_)][%55](%66[x])%ba ][$*"£$-9]_%54' bypasses modsecurity • _[r/a)_ _(r/b)_ _(r-d)_ • %n[^n]y[^j]l[^k]d[^l]h[^z]t[^k]b[^q]t[ ^q][^n]!% • %_[aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa[! -z]@$!_% XSS-proxy, Paros, Burp, Metasploit DS-002 DS-003 DS-004 Locking Customer Accounts Locking Customer Accounts Testing for DoS Buffer Overflows Buffer Overflows User Specified Object Allocation User Specified Object Allocation Locking Customer Accounts Wrong Attempts Valid Username enumeration - Login Page, New User Reg Page, Password Reset Page Buffer O if you have verflows received a response (or a lack of) that makes you believe that the overflow has occurred, attempt to make another request to the server and see if it still responds User Sp ecified Obj ect Allocat ion Submit large inputs and check how the server responds 78 If the application does not pose an upper limit to the number of items that can be in any given moment inside the user electronic cart, you can write an automated script that keeps adding items to the user cart until the cart object fills the server memory DS-005 DS-006 User Input as a Loop Counter - User Input as a Loop Counter Writing User Provided Data to Disk Writing User Provided Data to Disk User In put as a Lo op Counte r if the user can directly or indirectly assign a value that will be used as a counter in a loop function, this can cause performance problems on the server The tester submits an extremely long value to the server in the request, and the application logs the value directly without having validated that it conforms to what was expected The application may have data validation to verify the submitted value being well formed and of proper length, but then still log the failed value (for auditing or error tracking purposes) into an application log Writing User Provi ded Data t o Disk 79 DS-007 Failure to Release Resources Failure to Release Resources Failure t o Release Resources • An application locks a file for writing, and then an exception occurs but does not explicitly close and unlock the file • Memory leaking in languages where the developer is responsible for memory management such as C & C++ In the case where an error causes normal logic flow to be circumvented, the allocated memory may not be removed and may be left in such a state that the garbage collector does not know it should be reclaimed • Use of DB connection objects where the objects are not being freed if an exception is thrown A number of such repeated requests can cause the application to consume all the DB connections, as the code will still hold the open DB object, never releasing the resource 80 Web Services Testing DS-008 Storing too Much Data in Session Storing too Much Data in Session WS-001 WS Information Gathering N.A WS-002 Testing WSDL - WSDL Storing too Much Data in Se ssion N.A curl request POST header “Content-type: text/xml data @my_request.x ml http://api.goog le.com/search/ beta2 WSDL Weakness The developer may have chosen to cache the records in the session instead of returning to the database for the next block of data If this is suspected, create a script to automate the creation of many new sessions with the server and run the request that is suspected of caching the data within the session for each one Let the script run for a while, and then observe the responsiveness of the application for new sessions It may be possible that a Virtual Machine (VM) or even the server itself will begin to run out of memory because of this attack * inurl:wsdl site:example.com * Web Services Discovery DISCO, UDDI * http://seekda.com * http://www.wsindex.org * http://www.soapclient.com Net Square wsPawn, SOAPClient4XG, CURL, Perl SOAPlite, OWASP WebScarab: Web Services plugin, WSDigger WebScarab, WSDigger 81 Weakness WS-003 XML Structural Testing Weak XML Structure Weak X ML Struct ure WS-004 XML content-level Testing - XML content-level HTTP GET parameters/R EST Testing WS HTTP GET parameters/R EST Naughty SOAP attachments WS Naughty SOAP attachments Replay Testing - WS XML co ntent-level WS-005 WS-006 WS-007 * A web service utilizing DOM-based parsing can be "upset" by including a very large payload in the XML message, which the parser would be obliged to parse * Binary attachments - Large BLOB * WSDigger contains sample attack plug-ins for SQL injection, XSS, XPATH injection attacks 1) SQL Injection or XPath injection 2) Buffer Overflow and 3) Command Injection WS HTT P GET par ameters/R EST https://www.ws.com/accountinfo? accountnumber=12039475' exec master xp_cmdshell 'net user Vxr pass /Add &userId=asi9485jfuhe92 WS Nau ghty SOAP attachmen ts Attach a test virus attachment using a non-destructive virus like EICAR, to a SOAP message and post to the target Web Service WS Rep lay Testing Capture the Traffic with sniffers/proxy and replay the request 82 WebScarab, WSDigger WebScarab, MetaSploit WebScarab, Ethreal, Replay Testing Ajax Testing WireShark, TCPReplay AJ-001 AJAX Vulnerabilities - N.A N.A AJ-002 AJAX Testing - AJAX weakness AJAX weakness * XMLHttpRequest Vulnerabilitie, SQL Injectio, XSS, DOM based XSS, JSON/XML/XSLT Injection * AJAX Bridging - Cross website requests are sent through this method * Cross Site Request Forgery (CSRF) * DOS - Multiple XMLHttpRequests Parse the HTML and JavaScript files Proxy tools, and Firebug using a proxy to observe traffic OWASP Sprajax 83 XIII TÀI LIỆU THAM KHẢO Ristic, Ivan Modsecurity Handbook: The Complete Guide to the Popular Open Source Web Application Firewall S.l.: Feisty Duck, 2010 Web • Barnett, Ryan The Web Application Defender's Cookbook: Battling Hackers and Protecting Users Indianapolis, Ind: Wiley, 2013 • "ModSecurity® Reference Manual." Reference Manual Trustwave Holdings, Inc., n.d Web • OWASP Testing Guide 3rd ed N.p.: OWASP Foundation, n.d OWASP Testing Guide V3 2010 Web • "OWASP Based Web Application Security Testing Checklist." OWASP Based Web Application Security Testing Checklist N.p., 19 Oct 2011 Web • 84 ... để bảo vệ web server ModSecurity cho phép bảo vệ web server (một/nhiều) thông qua chế can thiệp trực tiếp mức độ ứng dụng Đồ án nhằm nghiên cứu ứng dụng ModSecurity để bảo vệ hệ thống web II... đề án: Nghiên cứu ứng dụng Mod Security để bảo vệ web server Người hướng dẫn: Lưu Thanh Trà Thời gian thực hiện: 14 tuần Số lượng SV I Mục đích Các firewall truyền thống không đủ mạnh để để bảo. .. Nhóm nghiên cứu Truswave SpiderLabs phát triển nhóm tập lệnh có tên OWASP ModSecurity CRS, bao gồm nội dung gói tin kiểu cơng biết đến Một tính mạnh mẽ CRS bảo vệ ứng dụng web phổ biến ứng dụng web

Ngày đăng: 03/08/2020, 21:43

Từ khóa liên quan

Mục lục

  • I. PHIẾU GIAO ĐỀTÀI

  • II. NHẬP ĐỀ

  • IV. GIỚI THIỆU MOD_SECURITY

    • CHỨC NĂNG

      • Parsing

      • Buffering

      • Logging

      • Rule Engine

      • CẤU TRÚC RULE TRONG ModSecurity

      • QUY TRÌNH XỬ LÝ TRONG ModSecurity

        • Request Header (1)

        • Request body (2)

        • Response headers (3)

        • Response body (4)

        • Logging (5)

        • KHUYẾN CÁO KHI TRIỂN KHAI THỰC TẾ

        • V. TỐNG QUAN VỀ TIÊU CHUẨN OWASP TOP TEN

        • VI. CÀI ĐẶT MODSECURITY

        • VII. CẤU HÌNH

          • Cấu hình thư mục

          • Các tập tin cấu hình

          • Các chỉ thị trong tập tin cấu hình

          • Quản lý Request Body

          • Quản lý Response Body

Tài liệu cùng người dùng

Tài liệu liên quan