Showing posts with label pentest. Show all posts
Showing posts with label pentest. Show all posts

Tuesday, 9 May 2017

Web Server Penetration Testing Checklist

Web server pen testing performing under 3 major category which is identity, Analyse, Report Vulnerabilities such as authentication weakness, configuration errors, protocol Relation vulnerabilities.
“Conduct a serial of methodical and Repeatable tests “ is the best way to test the web server along with this to work through all of the different application Vulnerabilities.

  • “Collecting as Much as Information” about an organization Ranging from operation environment is the main area to concentrate with the initial stage of web server Pen testing.
  • Performing web server Authentication Testing , use Social engineering techniques to collect the information about the Human Resources , contact Details and other  Social Related information.
  • Gathering Information about the Target, use whois database query tools to get the Details such as Domain name, IPaddress, Administrative Details, autonomous system number, DNS etc.

  • Fingerprint web server to gather information such as server name, server type, operating systems, application running on the server etc use fingerprint scanning tools such as , Netcraft, HTTPrecon , ID Serve .
  • Crawel Website to gather Specific information  from web pages, such as email addresses
  • Enumerate web server Directories to extract important information about web functionalities, login forms etc.
  • Perform Directory traversal Attack to access Restricted Directories and execute the command from outside of the Web server root directories.

  • Performing vulnerability scanning to identify the weakness in the network use the vulnerability scanning tools such as HPwebinspect, Nessus . and determine if the system can be exploited.
  • Perform we cache poisoning attack to force the web server’s cache to flush its actual cache content and send a specifically crafted request which will be stored in the cache.
  • Performing HTTP response splitting attack to pass malicious data to a vulnerable application that includes the data in an HTTP response header.
  • Bruteforce SSH,FTP, and other services login credentials to gain unauthorized access.
  • Perform session hijacking to capture valid session cookies and ID’s,use tools such as       Burb suite , Firesheep ,jhijack to automated session hijacking.
  • Performing MITM attack to access the sensitive information by intercepting the altering the communications between the end users and web servers.
  • Use tools such as  webalizer, AWStats to examine the web server logs .

CORE Impact pro

CORE Impact pro is the software solution for assessing  and testing the vulnerabilities in the organization’s web servers , Nerwork system’s , Endpoint systems , wireless networks , network devices ,Mobile devices ,IDS/IPS  .

Important Checklist Suggested by Microsoft

Services

  • Unnecessary Windows services are disabled.
  • Services are running with least-privileged accounts.
  • FTP, SMTP, and NNTP services are disabled if they are not required.
  • Telnet service is disabled.

Protocols

  • WebDAV is disabled if not used by the application OR it is secured if it is required.
  • TCP/IP stack is hardened
  • NetBIOS and SMB are disabled (closes ports 137, 138, 139, and 445).

Accounts

  • Unused accounts are removed from the server.
  • Guest account is disabled.
  • IUSR_MACHINE account is disabled if it is not used by the application.
  • If your applications require anonymous access, a custom least-privileged anonymous account is created.
  • The anonymous account does not have write access to Web content directories and cannot execute command-line tools.
  • Strong account and password policies are enforced for the server.
  • Remote logons are restricted. (The “Access this computer from the network” user-right is removed from the Everyone group.)
  • Accounts are not shared among administrators.
  • Null sessions (anonymous logons) are disabled.
  • Approval is required for account delegation.
  • Users and administrators do not share accounts.
  • No more than two accounts exist in the Administrators group.
  • Administrators are required to log on locally OR the remote administration solution is secure.

Files and Directories

  • Files and directories are contained on NTFS volumes
  • Web site content is located on a non-system NTFS volume.
  • Log files are located on a non-system NTFS volume and not on the same volume where the Web site content resides.
  • The Everyone group is restricted (no access to \WINNT\system32 or Web directories).
  • Web site root directory has deny write ACE for anonymous Internet accounts.
  • Content directories have deny write ACE for anonymous Internet accounts.
  • Remote  administration application is removed
  • Resource kit tools, utilities, and SDKs are removed.
  • Sample applications are removed

Shares

  • All unnecessary shares are removed (including default administration shares).
  • Access to required shares is restricted (the Everyone group does not have access).
  • Administrative shares (C$ and Admin$) are removed if they are not required (Microsoft Management Server (SMS) and Microsoft Operations Manager (MOM) require these shares).

Ports

  • Internet-facing interfaces are restricted to port 80 (and 443 if SSL is used)
  • Intranet traffic is encrypted (for example, with SSL) or restricted if you do not have a secure data center infrastructure.

Registry

  • Remote registry access is restricted.
  • SAM is secured (HKLM\System\CurrentControlSet\Control\LSA\NoLMHash).

Auditing and Logging

  •  Failed logon attempts are audited.
  •  IIS log files are relocated and secured.
  • Log files are configured with an appropriate size depending on the application security requirement.
  • Log files are regularly archived and analyzed.
  • Access to the Metabase.bin file is audited.
  • IIS is configured for W3C Extended log file format auditing.

Server Certificates

  • Ensure certificate date ranges are valid.
  • Only use certificates for their intended purpose (For example, the server certificate is not used for e-mail).
  •  Ensure the certificate’s public key is valid, all the way to a trusted root authority.
  • Confirm that the certificate has not been revoked.
Source

Web Application Penetration Testing Checklist – A Detailed Cheat Sheet

What is Web Application Penetration Testing?

Web Application Pen testing is a method of identifying, analyzing and Report the vulnerabilities which is existing in the Web application including buffer overflow, input validation, code Execution, Bypass Authentication, SQL Injection, CSRF, Cross sight scripting in the target web Application which is given for Penetration Testing.
Repeatable Testing and Conduct a serious of method One of the Best Method conduct Penetration testing for all kind of web application vulnerabilities.

Information Gathering

1. Retrieve and Analyze the robot.txt files by using a tool called GNU Wget.
2.Examine the version of software.database Details, the error technical component, bugs by the error codes by requesting invalid pages.
3.Implement the techniques such as DNS inverse queries, DNS zone Transfers, web based DNS Searches.
4.Perform Directory style Searching and vulnerability scanning, Probe for URLs, using tools such as NMAP and Nessus.
<
5.Identify the Entry point of the application using Burp Proxy,OWSAP ZAP, TemperIE, WebscarabTemper Data.
6.By using traditional Fingerprint Tool such as Nmap,Amap, perform TCP/ICMP  ansd service Fingerprinting.
7 .By Requesting Common File Extension such as .ASP, .EXE, .HTML, .PHP ,Test for recognized file types/Extensions/Directories.
8.Examine the Sources code From the Accessing Pages of the Application front end.

Authentication Testing

1.Check if it is possible to “reuse” the session after Logout.also check if the application automatically logs out a user has idle for a certain amount of time.
2.Check whether any sensitive information  Remain Stored stored in browser cache.
3.Check and try to Reset the password, by social engineering crack secretive questions and guessing.
4.check if the “Remember my password” Mechanism is implemented by checking the HTML code of the login page.
5.Check if the hardware devices directly communicate and independently with authentication infrastructure using additional communication channel.
6. Test CAPTCHA for authentication vulnerabilities presented or not.
7.Check whether any weak security questions/Answer are presented.

Authorization Testing

  1. Test the Role and Privilege Manipulation to Access the Resources.
2.Test For Path Traversal by Performing input Vector Enumeration and analyze the input validation functions presented in the web application.
3.Test for cookie and parameter Tempering using web spider tools.
4.Test for HTTP Request Tempering and check whether gain illegal access to reserved resources.

Configuration  Management Testing

1.Check directory and File Enumeration review server and application Documentation. also, check the infrastructure and application admin interfaces.
2.Analyze the Web server banner and Performing network scanning.
3.Check and verify the presence of old Documentation and Backup and referenced files such as sources codes, passwords, installation paths.
4.check and identify the ports associated with the SSL/TLS services using NMAP and NESSUS.
5.Review OPTIONS HTTP method using Netcat and Telnet.
6. Test for HTTP methods and XST for credentials of legitimate users.
7.Perform application configuration management test to review the information of the source code, log files and default Error Codes.

Session Management Testing

1.Check the URL’s in the Restricted area to Test for Cross sight Request Forgery.
2.Test for Exposed Session variables by inspecting Encryption and reuse of session token, Proxies and caching, GET&POST.
3.Collect sufficient number of cookie samples and analyze the cookie sample algorithm and forge a valid Cookie in order to perform an Attack.
4.Test the cookie attribute using intercept proxies such as Burp Proxy, OWASP ZAP, or traffic intercept proxies such as Temper Data .
5.Test the session Fixation, to avoid seal user session.(session Hijacking )

Data Validation Testing

1.Performing Sources code Analyze for javascript Coding Errors.
2. Perform Union Query SQL injection testing, standard SQL injection Testing, blind  SQL querY Testing, using tools such as sqlninja,sqldumper,sql power injucter .etc.
3.Analyze the HTML Code,Test for stored XSS,leverage stored XSS,using tools such as XSS proxy,Backframe,Burp Proxy, OWASP, ZAP,XSS Assistant.
4.Perform LDAP injection testing for sensitive information about users and hosts.
5.Perform IMAP/SMTP injection Testing for Access the Backend Mail server.
6.Perform XPATH Injection Testing for Accessing the confidential information
7.Perfrom XML injection testing to know information about XML Structure .
8.Perform Code injection testing to identify input validation Error .
9.Perform Buffer Overflow testing for Stack and heap memory information and application control flow.
10.Test for HTTP Splitting and smuggling for cookies and HTTP redirect information .

Denial of Service Testing

1.Send Any Large number of Requests that perform database operations and observe any Slowdown and  New Error Messages.
2.Perform manual source code analysis and submit a range of input varying lengths to the applications
3.Test for SQL wildcard attacks for application information testing.
4.Test for User specifies object allocation whether a maximum number of object that application can handle.
5.Enter Extreme Large number of the input field that used by the application as a Loop counter.
6.Use a script to automatically submit an extremely long value for sever can be logged the request.

Source