{"id":20216,"date":"2014-10-14T08:48:01","date_gmt":"2014-10-14T14:18:01","guid":{"rendered":"https:\/\/www.solutionanalysts.com\/blog\/security-testing\/"},"modified":"2023-08-16T23:02:06","modified_gmt":"2023-08-17T04:32:06","slug":"security-testing","status":"publish","type":"post","link":"https:\/\/www.solutionanalysts.com\/blog\/security-testing\/","title":{"rendered":"SECURITY TESTING"},"content":{"rendered":"<h2><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>As continues we are using web applications the size of useful data on the web increases, proper security testing of web applications is becoming very important. Security testing is the very much important process of testing life cycle, It is the process to confirm that <strong>confidential data stays confidential<\/strong> and users have access to perform only those tasks which are authorized to access.<\/div>\n<div><\/div>\n<div>The purpose of the security test is to discover the vulnerabilities of the web application so that the developers can then remove these vulnerabilities from the application and make the web application and data safe from unauthorized actions.<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Key_Terms_Used_in_Security_Testing\"><\/span>Key Terms Used in Security Testing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Vulnerability\"><\/span><strong>Vulnerability<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>It is like any type of weakness in the web application. The cause of it can be bugs in the application, an injection (SQL\/ script code) or the presence of viruses.<\/div>\n<div>Vulnerability can be as simple as weak passwords or as complex SQL injection vulnerabilities.<\/div>\n<div><\/div>\n<div><strong>Example<\/strong><\/div>\n<p><span style=\"line-height: 1.538em;\">http:\/\/www.testattack.com\/index.php?page=http:\/\/www.vulnerabilityattack.com\/attack.txt (This attack is for executing attack code on remote server)<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"URL_Manipulation\"><\/span><strong>URL Manipulation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>Also known as URL rewriting, is the process of modifying parameters. Websites communicate with servers for sharing information to client (browser). Changing some information in the URL may sometimes lead to abnormal behaviour by the server.<\/div>\n<div><\/div>\n<div>The tester must check url if the application passes important information in the query string. This happens when the application uses the HTTP methods to pass information between the client and the server. The tester can modify a parameter value in the query string to check if the server accepts it.<\/div>\n<div><\/div>\n<div><strong>Example<\/strong><\/div>\n<p><span style=\"color: #000080;\">http:\/\/www.testattack.com\/savepage.php?nr=147&amp;status=del<\/span> (Changed status code from add to del to delete)<\/p>\n<p><span style=\"line-height: 1.538em;\"><span style=\"color: #000080;\">http:\/\/www.testattack.com\/customerdetails.php?cid=149<\/span> (Changed customer Id to view the details of customer id = 149)<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"SQL_Injection\"><\/span><strong>SQL Injection<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>This is code injection technique through the web application. In this technique site parameters are passed to database in form of SQL query in order to access database or modify it. Special characters from user inputs should be handled\/escaped properly.<\/div>\n<div><\/div>\n<div>Entering a single quote (\u2018) in any textbox should be rejected by the application. If the tester succeeds to generate a database error, it means that the user details inserted in some query which is then executed by the application. In such a case, the application is vulnerable to SQL injection.<\/div>\n<div><\/div>\n<div><strong>Example<\/strong><\/div>\n<p>Write below query in input fields and submit page rather than write in url and post page on server.<\/p>\n<p><span style=\"color: #000080;\">&#8220;SELECT * FROM users WHERE username = &#8216;martin'&#8221;;\u00a0<\/span><\/p>\n<p><span style=\"color: #000080;\">&#8220;SELECT * FROM users WHERE username = &#8221; or &#8216;1=1&#8242;&#8221;;<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"XSS_Cross_Site_Scripting\"><\/span><strong>XSS (Cross Site Scripting)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>It is a type of injection which is typically found in web applications. Attacker can use this method to execute malicious script or URL on victim\u2019s browser. Using cross-site scripting, attacker can use scripts like JavaScript to catch user cookies and information stored in the cookies.<\/div>\n<div><\/div>\n<div>The tester should additionally check the web application for XSS (Cross site scripting). Any HTML e.g. &lt;HTML&gt; or any script e.g. &lt;SCRIPT&gt; should not be accepted by the application.<\/div>\n<div><\/div>\n<div><strong>Example<\/strong><\/div>\n<p><span style=\"color: #000080;\">http:\/\/www. testattack.com\/index.php?userid=123&amp;query=xyz<\/span><\/p>\n<p><span style=\"color: #000080; line-height: 1.538em;\">&lt;form action=&#8221;view.php&#8221; method=&#8221;GET&#8221; \/&gt; Welcome &lt;p&gt;Enter your name: &lt;input type=&#8221;text&#8221; name=&#8221;myname&#8221; \/&gt;&lt;br \/&gt; &lt;input type=&#8221;submit&#8221; value=&#8221;Find&#8221; \/&gt;&lt;\/p&gt;&lt;br&gt; &lt;\/form&gt; &lt;?php echo &#8220;&lt;p&gt;Your Name &lt;br \/&gt;&#8221;; echo ($_GET[myname]); ?&gt;<\/span><\/p>\n<div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Password_Cracking\"><\/span><strong>Password Cracking<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>In security testing of a web application Password cracking methods can be used to identify weak passwords. It can be start using guessing the common username and password or use of password cracking tool.<\/div>\n<div><\/div>\n<div>If username or password is stored in cookies without encrypting, attacker can use different methods to steal username and password.<\/div>\n<div><\/div>\n<div><strong>Example<\/strong><\/div>\n<p>Try to get username and password details from cookie in browser.<\/p>\n<p>Modify variables using view source and resubmit page.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Penetration\"><\/span><strong>Penetration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div>It is a type of security testing process to find out insecure areas in projects. The main purpose of this testing is to protect the secure\/important data from unknown user who is not valid user of the system like hackers.<\/div>\n<div><\/div>\n<div>There are two types of penetration testing, White box testing &amp; Black box testing. In White box testing tester is having all information of system like IP Address, Code &amp; flow diagram &amp; based on available information tester will perform the testing.<\/div>\n<div><\/div>\n<div>In Black box testing, tester will perform testing without having any information of system. This will be more accurate testing method as testing done like real hackers.<\/div>\n<div><\/div>\n<div><strong>Example\u00a0<\/strong><\/div>\n<p>Try to get password using reset feature.<\/p>\n<p>Input validations must be validated server side also.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>In this blog we\u2019ve explained common terms which are used in web application vulnerabilities. Also we need to take care while security testing, the tester must be very careful and not to modify any of the following:<\/div>\n<ul>\n<li>Configuration of the application or the server.<\/li>\n<li>Services running on the server.<\/li>\n<li>Existing user or customer data hosted by the application.<\/li>\n<\/ul>\n<div><span style=\"line-height: 1.538em;\">Additionally, a security test should be avoided on a production system.<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction As continues we are using web applications the size of useful data on the web increases, proper security testing of web applications is becoming very important. Security testing is the very much important process of testing life cycle, It is the process to confirm that confidential data stays confidential and users have access to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":20217,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[246],"tags":[],"class_list":["post-20216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/comments?post=20216"}],"version-history":[{"count":3,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20216\/revisions"}],"predecessor-version":[{"id":32647,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/posts\/20216\/revisions\/32647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media\/20217"}],"wp:attachment":[{"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/media?parent=20216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/categories?post=20216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.solutionanalysts.com\/blog\/wp-json\/wp\/v2\/tags?post=20216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}