Today, it is a lot easier to manage websites on the internet. All thanks to the open-source CMS solutions like WordPress, Drupal, Magento, etc. As a result of this, more and more businesses are extending to the virtual world.

But proportionately the hacks on these websites are also increasing with every passing year.

For someone who is not familiar with the domain of website security, may find it difficult to protect their website. This is where a security audit and website penetration testing comes into play.

Website penetration testing is getting into the shoes of the hacker and exploiting a computer system, network or web application to find vulnerabilities is called Website Penetration Testing. Security audits and pentesting is a great way to know your security vulnerabilities before a hacker does.

In this article, I will give you the methodology and a checklist to successfully carry out website penetration testing. Also mentioned in the article are a few tools that might come handy during the process. But, before starting with the method, let me highlight why website penetration testing is a must.

Importance of Website Penetration Testing and Security Audit

Often website owners say things like, “Mine is just a small website, do I need a website pentesting?”. The answer is yes. Research has it that nearly 60% of attacks target small businesses.

Long story short, website penetration testing can help you in the following ways:

  • It uncovers serious security flaws that could have led to the compromise.  Thus pentesting protects you loosing your sensitive web assets.
  • It gives the user a holistic view of improvements needed on the website.
  • Emulates real-life attack scenarios and helps in mitigating risks thereby ultimately helping to meet compliances like PCI-DSS.
  • Uncovers vulnerabilities could have led to data leakage which in turn would have legal consequences.
  • Help in preparing the security team to cope up with a real-life cyber attack.

Methodology for Website Penetration Testing and Security Audit

Website penetration testing is done primarily in 3 phases:

  1. The first phase is information gathering. In information gathering, the pentester tries to find fingerprints in the backend of the website. It usually includes Server OS, CMS version, etc.
  2. The second step is where automatic tools are deployed to uncover any known flaws or known CVEs in the respective services.
  3. In the final step of exploitation, the goal is to leverage any vulnerabilities discovered in the second phase. This is often done manually to weed out false positives. The exploitation part is also used to exfiltrate information from the target and to maintain persistence.

1. Information Gathering

The first phase is information gathering in which, the pentester tries to find fingerprint the backend services of the website i.e. Server OS, CMS version, etc.

Network Mapper a.k.a. NMAP

Nmap has been the absolute favorite recon tool of website pentester for a long time and there is a solid reason for that. The abilities of Nmap are:

  • It can discover Open ports on the server.
  • Fingerprinting the server OS.
  • Bypassing the firewall to scan the target stealthily.
  • Uncovering services running on those ports.
  • It’s NSE scripts can automate tasks including certain vulnerabilities detection.

To see more options, fire your Kali and in the command line terminal and type ‘nmap‘. Also, users can try Zenmap which is the GUI version of Nmap.

The Harvester

While tools like NMAP does a black box information gathering, there are certain tools like The Harvester which collect Open Source Intelligence (OSINT). OSINT is the information present in the public domain regarding your target i.e. Whois registration info, company emails, etc. This info comes in handy while website penetration testing. It is spread out on sites like Google, Whois, etc. So, the harvester compiles it from all sources and gives you a one-stop solution.

2. Discovery

The second step is Discovery in which automatic tools are deployed to uncover any known flaws or known CVEs in the respective services.

Nikto

Nikto is a tool specifically designed to scan vulnerabilities in around 270 types of servers. It can extensively search for 6700 server misconfiguration.

However, the limitation of Nikto is that it is very noisy and can often generate false positives. Moreover, the firewall evasion techniques of Nikto are very poor. However, when combined with another Inundator (to evade IDS) of Kali, it can be effective.

Therefore, before using Nikto for website penetration testing, make sure to turn off your firewall or IDS for better results.

To scan a target using Nikto, simply open the terminal in Kali and type: nikto -h 'your-target‘

Burp Suite

Burp Suite is a website pentesting framework built on java. It has a built-in proxy that intercepts traffic between your browser and the website pentesting target. This proxy can be then used to manipulate requests or for fuzzing to discover vulnerabilities in a website.

While manipulation of requests can help in finding vulnerabilities, fuzzing can uncover error messages and application behavior too. This tool has become almost an industry standard and is a must-have for website penetration testing.

Open Vas

OpenVAS is a vulnerability scanner that can perform a complete vulnerability scan of the network infrastructure. It can be easily scaled as per your needs and can perform a wide variety of tests. This tool is owned by Greenbone and the paid solution is called Greenbone Security feed while the free one is called Greenbone Community feed. The prime difference between both the editions is the NVTs (Network Vulnerability Scanner test).

3. Exploitation

Metasploit

Metasploit framework is almost an industry standard when it comes to exploitation of the target. Metasploit can also perform recon using Nmap. If you find any vulnerabilities, there are a plethora of exploits to choose from. Finally, pair your exploit with a suitable payload and you are good to go. Metasploit even has a great choice of post-exploitation tools. Metasploit is owned by Rapid 7 and is written in ruby. Almost all proof of concepts of popular zero-day flaws is updated as Metasploit modules.

To launch Metasploit, open the terminal in your Kali Linux and type: ‘msfconsole‘

SQLMAP

Sqlmap is a one-stop solution to find any SQL injection vulnerabilities on your website and to exploit them. Sqlmap can fuzz the target parameters in the URL and even data fields on the page to find any SQL injection points. Sqlmap can thereafter exploit them to provide you a pseudo SQL shell or cmd shell from the target machine.

To see more options, open the terminal in your Kali and type: sqlmap -h

Xsser

Xsser is a small and lightweight tool to find and exploit XSS bugs during website penetration testing. XSS bugs are fairly common and there is a lot you can uncover with this small tool.

To run the GUI version, open the terminal in Kali and type: xsser –gtk

How Website Security Audit Can Get You Certifications?

PCI-DSS

Often e-commerce sites deal with sensitive user payment info to conduct their daily operations. This sensitive data means, there should be a standard security practice on every website.

This is ensured by the Payment Card Industry which consists of almost all organizations dealing with debit and credit cards. Therefore PCI Data Service Standards (DSS) is a set of 12 security protocols that every business dealing with credit card info has to comply with. These protocols were developed by the PCI security standard council. In case there is a failure to comply with these protocols, PCI may impose a fine or terminate the credit card processing privileges of that particular organization. These 12 requirements to be PCI-DSS compliant are as under:

Network and Systems Security

Requirement #1: Install and maintain a WAF to protect the data of cardholders.Requirement #2: Default and hardcoded passwords provided by the vendor should not be used.

Data Protection

Requirement #3: Protect the data stored of the cardholder from cyber attacks.

Requirement #4: The transmission of cardholder data should be encrypted over open networks.

Regular Vulnerability Management

Requirement #5: Keep the antivirus solution updated and ensure proper mechanism against malware.

Requirement #6: Develop a secure application and maintain secure systems.

Proper Access Control Measures

Requirement #7: Restrict access to cardholder data by implementing role-based access control.Requirement #8: Identify and authenticate access to system components.Requirement #9: Set constraints to physical access to cardholder data.

Network Monitoring and Testing

Requirement #10: Regularly monitor all access to network resources and cardholder data

Requirement #11: Run frequent tests on all the security systems and processes.

Information Security Policy

Requirement #12: Implement a policy that covers all personnel for information security.

Website Penetration Testing and Security Audit: Checklist

Information Gathering

  • Port Scanning
  • Web Server, CMS Version, and OS fingerprinting.
  • HTTP Methods
  • Cookie Attributes

Discovery

  • Finding alternative content i.e. directory/files brute force.
  • Finding default configurations or misconfigurations.
  • Login Fuzzing.
  • Testing Session Tokens.
  • Injections: SQL, XSS, XML, Template, OS Command.
  • Open Redirection.
  • LFI & RFI attacks.
  • Business Logic Flaws.
  • Denial of Service.
  • Testing REST and SOAP web services.

Encryption Flaws

  • Heartbleed
  • Poodle
  • HTTPS strip
  • Oracle Padding Attack
  • Weak Cryptography or Poor implementation

Exploitation:

  • Browser hijacking using XSS.
  • Data Exfiltration using various injections.
  • Authentication Bypass.
  • Offline password cracking.
  • Cross-Site Request Forgery.

Conclusion

The crux of this article is that website penetration testing is important for everyone, be its small blogs or large corporations. Moreover, there are plenty of tools available freely to conduct website penetration testing.

The three steps of website pentesting (Info gathering, discovery & exploitation) will guide and organize the whole process of website penetration testing. So get started today and audit the security of your website!

However, if you feel that you are new to this field or find this task cumbersome, worry not Astra is always there to help you. Our community of experienced security experts will pentest your website and report any vulnerabilities in a detailed and easy to understand manner. They will also provide you with the fixation steps and even promise to help you or your developer in patching it.

If you wish to get help from experts at Astra, get in touch with us using the chat widget at the bottom right corner of your screen or click here.

Was this post helpful?

Waiting to Get Hacked?

Get security tips & latest vulnerability fixes right in your inbox:

About The Author

Keen to learn almost everything that computers have to offer. Check out my Github profile for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close