{"id":19879,"date":"2021-02-03T00:30:52","date_gmt":"2021-02-02T19:00:52","guid":{"rendered":"https:\/\/valeurbit.com\/blog\/?p=19879"},"modified":"2021-02-12T18:14:46","modified_gmt":"2021-02-12T12:44:46","slug":"how-to-find-a-vulnerability-in-a-python-application","status":"publish","type":"post","link":"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/","title":{"rendered":"How To Find A Vulnerability In A Python Application?"},"content":{"rendered":"\n<p>There are many comprehensive online security testing scanners out there, but they may not be able to detect a specific weakness in a platform like Python, Node.js.&nbsp;etc.<\/p>\n\n\n\n<p>Let&#8217;s take a look at the list of scanners to find a security risk in a Python application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. PYT (Python Taint)<\/h2>\n\n\n\n<p>An open source static analysis tool for protecting against command injection, cross-site scripting (XSS), SQL injection, and directory attacks in Python web applications.<\/p>\n\n\n\n<p>If you would like to contribute to&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/python-security\/pyt\" target=\"_blank\">PYT<\/a>&nbsp;, then you can join their&nbsp;slack group&nbsp;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Bandit<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/PyCQA\/bandit\" target=\"_blank\" rel=\"noreferrer noopener\">Bandit<\/a>&nbsp;&nbsp;is a free open source tool for finding vulnerabilities in your Python code.&nbsp;This tool processes each file and generates a report.<\/p>\n\n\n\n<p>You can install it with&nbsp;<code>pip<\/code>.<\/p>\n\n\n\n<p>You can customize the&nbsp;<strong>Bandit<\/strong>&nbsp;checkout configuration&nbsp;.&nbsp;By default, the test is performed for all profiles, however, if you only want to test&nbsp;<strong>ShellInjection<\/strong>&nbsp;, use the command below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bandit samples\/*.py -p ShellInjection<\/code><\/pre>\n\n\n\n<p>You can also report based on the severity level (low, medium, or high).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Pyntch<\/h2>\n\n\n\n<p>Tool&nbsp;<a href=\"http:\/\/www.unixuser.org\/~euske\/python\/pyntch\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Pyntch<\/a>&nbsp;&nbsp;supports Python 2.x only, static code analyzer for the detection of possible errors at run time.<\/p>\n\n\n\n<p>It will not help you find a vulnerability in your code, but it can be useful for identifying errors in exceptions.<\/p>\n\n\n\n<p>It is a fast tool capable of scanning thousands of lines per minute.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Spaghetti<\/h2>\n\n\n\n<p>A handy open source Python-based scanner for detecting misconfigurations, unsafe files, and supporting web frameworks like CherryPy, CakePHP, etc.<\/p>\n\n\n\n<p><strong>Spaghetti&nbsp;<\/strong>&nbsp;is capable of detecting a variety of attacks, including the following:<\/p>\n\n\n\n<ul><li>Brutforce attack<\/li><li>Hacking Credit Card, Email, IP Disclosure<\/li><li>HTML \/ SQL \/ LDAP \/ XPATH \/ XSS<\/li><li>ShellShock, Crime, Struts-shock<\/li><li>Anonymous cipher<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">5. RATS (Rough Auditing Tools for Security)<\/h2>\n\n\n\n<p>The&nbsp;<a href=\"https:\/\/code.google.com\/archive\/p\/rough-auditing-tool-for-security\/\" target=\"_blank\" rel=\"noreferrer noopener\">RATS<\/a>&nbsp;tool&nbsp;&nbsp;analyzes Python, PHP, Perl, C ++ code and highlights security errors as shown below:<\/p>\n\n\n\n<ul><li>Check time<\/li><li>Usage time<\/li><li>Buffer overflow<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">6. Acunetix<\/h2>\n\n\n\n<p>Acunetix checks your site for over 5,000 different vulnerabilities and provides a detailed report with recommendations for fixing.&nbsp;It is a comprehensive vulnerability scanning platform for testing web applications.<\/p>\n\n\n\n<p>If you have a Python web application, this tool will help you with in-depth security analysis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Requires<\/h2>\n\n\n\n<p><a href=\"https:\/\/requires.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">require.io<\/a>&nbsp;&nbsp;monitors the safety of Python dependencies and notifies you when it detects deprecated or vulnerable modules.<\/p>\n\n\n\n<p>You can customize how you receive notifications by adding badges, email, or GitHub pull.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. Safety<\/h2>\n\n\n\n<p>Python dependency checker,&nbsp;<a href=\"https:\/\/pyup.io\/safety\/\" target=\"_blank\" rel=\"noreferrer noopener\">Safety<\/a>&nbsp;&nbsp;can scan local virtual environment, requirements file, inputs&nbsp;<code>stdin<\/code>for security issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>I hope the tools listed above help you find security risks in your Python application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many comprehensive online security testing scanners out there, but they may not be able to detect a specific weakness in a platform like Python, Node.js.&nbsp;etc. Let&#8217;s take a look at the list of scanners to find a security risk in a Python application. 1. PYT (Python Taint) An open source static analysis tool&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Find A Vulnerability In A Python Application? | ValeurBit Infosec<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Find A Vulnerability In A Python Application? | ValeurBit Infosec\" \/>\n<meta property=\"og:description\" content=\"There are many comprehensive online security testing scanners out there, but they may not be able to detect a specific weakness in a platform like Python, Node.js.&nbsp;etc. Let&#8217;s take a look at the list of scanners to find a security risk in a Python application. 1. PYT (Python Taint) An open source static analysis tool...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/\" \/>\n<meta property=\"og:site_name\" content=\"ValeurBit Infosec\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/valeurbitinfo\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-02T19:00:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-12T12:44:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@valeurbit\" \/>\n<meta name=\"twitter:site\" content=\"@valeurbit\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/valeurbit.com\/blog\/#organization\",\"name\":\"Valeurbit Infosec\",\"url\":\"https:\/\/valeurbit.com\/blog\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/valeurbitinfo\/\",\"https:\/\/www.instagram.com\/valeurbit\",\"https:\/\/www.linkedin.com\/company\/valeurbit-infosec\/\",\"https:\/\/twitter.com\/valeurbit\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/valeurbit.com\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/valeurbit.com\/blog\/wp-content\/uploads\/2021\/02\/Valeurbit-new-logo-center.png\",\"contentUrl\":\"https:\/\/valeurbit.com\/blog\/wp-content\/uploads\/2021\/02\/Valeurbit-new-logo-center.png\",\"width\":1080,\"height\":512,\"caption\":\"Valeurbit Infosec\"},\"image\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/valeurbit.com\/blog\/#website\",\"url\":\"https:\/\/valeurbit.com\/blog\/\",\"name\":\"ValeurBit Infosec\",\"description\":\"Cyber Security Company\",\"publisher\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/valeurbit.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#webpage\",\"url\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/\",\"name\":\"How To Find A Vulnerability In A Python Application? | ValeurBit Infosec\",\"isPartOf\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/#website\"},\"datePublished\":\"2021-02-02T19:00:52+00:00\",\"dateModified\":\"2021-02-12T12:44:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/valeurbit.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Find A Vulnerability In A Python Application?\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#webpage\"},\"author\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/#\/schema\/person\/df20c1cd317765fa8677a3056caeccfa\"},\"headline\":\"How To Find A Vulnerability In A Python Application?\",\"datePublished\":\"2021-02-02T19:00:52+00:00\",\"dateModified\":\"2021-02-12T12:44:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/how-to-find-a-vulnerability-in-a-python-application\/#webpage\"},\"wordCount\":433,\"publisher\":{\"@id\":\"https:\/\/valeurbit.com\/blog\/#organization\"},\"articleSection\":[\"Valeurbit\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/valeurbit.com\/blog\/#\/schema\/person\/df20c1cd317765fa8677a3056caeccfa\",\"name\":\"ValeurBit\",\"sameAs\":[\"https:\/\/valeurbit.com\/blog\"],\"url\":\"https:\/\/valeurbit.com\/blog\/author\/valeurbit\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/posts\/19879"}],"collection":[{"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/comments?post=19879"}],"version-history":[{"count":0,"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/posts\/19879\/revisions"}],"wp:attachment":[{"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/media?parent=19879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/categories?post=19879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/valeurbit.com\/blog\/wp-json\/wp\/v2\/tags?post=19879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}