<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Maxpower on Medium]]></title>
        <description><![CDATA[Stories by Maxpower on Medium]]></description>
        <link>https://medium.com/@maxpowersii?source=rss-c8138ad80d5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cxUwRESLvjoP3tOfsYgbrg.png</url>
            <title>Stories by Maxpower on Medium</title>
            <link>https://medium.com/@maxpowersii?source=rss-c8138ad80d5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:37:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maxpowersii/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Top Free Static Code Analysis Tools]]></title>
            <link>https://medium.com/@maxpowersii/top-free-static-code-analysis-tools-7d39abe36e5c?source=rss-c8138ad80d5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d39abe36e5c</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[static-code-analysis]]></category>
            <dc:creator><![CDATA[Maxpower]]></dc:creator>
            <pubDate>Mon, 05 Mar 2018 13:24:28 GMT</pubDate>
            <atom:updated>2018-03-05T13:25:52.514Z</atom:updated>
            <content:encoded><![CDATA[<p>How many times, did you need an automatic static code analyzer? What was your first option? Some people often think in some commercial solutions like Fortify or Veracode, but what about the free options? The commercial options are too expensive, for small companies or for freelance security specialists. For that reason, we are going to enumerate the top of free static code analysis tools.</p><h3>Brakeman</h3><p><strong>For:</strong> Ruby<br><strong>Setup:</strong> Require Ruby and Gem. Install using “gem install Brakeman”.<br><strong>How to use:</strong> “brakeman application_path”<br><strong>Link:</strong> <a href="https://github.com/presidentbeef/brakeman">https://github.com/presidentbeef/brakeman</a><br><strong>Comments: </strong>It the best scanner for Ruby. Its specialty is the “on rails” applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*fUbPsdMv7gns2jVlFVk9Ug.png" /><figcaption>Brakeman — Ruby</figcaption></figure><h3>NodeJsScan</h3><p><strong>For:</strong> NodeJs<br><strong>Setup:</strong> It only requires python.<br><strong>How to use:</strong> “python NodeJsScan.py -d &lt;dir&gt;”<br><strong>Link:</strong> <a href="https://github.com/ajinabraham/NodeJsScan">https://github.com/ajinabraham/NodeJsScan</a><br><strong>Comments: </strong>This scanner has a minimum of false positive. It has periodic updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*Jz6kcSXLih5MRPd3oKkccA.png" /><figcaption>NodeJs Scan — NodeJs</figcaption></figure><h3>RIPS</h3><p><strong>For:</strong> PHP<br><strong>Setup:</strong> It requires PHP.<br><strong>How to use:</strong> RIPS is a web application written in PHP, you have to install Apache HTTP and run the web application.<br><strong>Link:</strong> <a href="https://sourceforge.net/projects/rips-scanner/">https://sourceforge.net/projects/rips-scanner</a><br><strong>Comments: </strong>This is great scanner. It finds a lot of possible issues. Sadly, the new version is not free, so the free version is not supported any more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*IidbJ4Ab2U9Suuc_VDUgnA.png" /><figcaption>RIPS — PHP</figcaption></figure><h3>Findbugs</h3><p><strong>For:</strong> Java<br><strong>Setup:</strong> It requires Java SE.<br><strong>How to use:</strong> Open the jar application, and select the source code folder.<br><strong>Link:</strong> <a href="http://findbugs.sourceforge.net/">http://findbugs.sourceforge.net/</a><br><strong>Comments: </strong>Findbugs is a general purpose scanner. It will find for bugs and bad practices. In particular, it has got a security module, which can find security issues like XSS, SQLi, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*Dkyr1e7OUQ5-u0FKiwLBPQ.png" /><figcaption>Findbugs — Java</figcaption></figure><h3>Microsoft FxCop</h3><p><strong>For:</strong> .Net<br><strong>Setup:</strong> It requires .Net<br><strong>How to use:</strong> Open the application, and select the exe or dll files.<br><strong>Link:</strong> <a href="https://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx">https://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx</a><br><strong>Comments: </strong>This is a good scanner, it will find the most of the vulnerabilities. This scanner will analyze the compiled files. If you have the code, you need compiled it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*H5bFLZhFicKwKZipKwdcdg.png" /><figcaption>Microsoft FxCop — .Net</figcaption></figure><h3>JsHint</h3><p><strong>For:</strong> JavaScript<br><strong>Setup:</strong> It requires NodeJs. To install run “npm install -g jshint”.<br><strong>How to use:</strong> “jshint application_path”<br><strong>Link:</strong> <a href="http://jshint.com/">http://jshint.com</a><br><strong>Comments: </strong>It find a lot of false positives. It finds code bad practices, most of them are not false positives (LOL).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*bSico7DW7SGAy9sH91IhOQ.png" /><figcaption>JsHint — JavaScript</figcaption></figure><h3>CodeCrawler</h3><p><strong>For:</strong> C#<br><strong>Setup:</strong> It requires .Net<br><strong>How to use:</strong> Open the application folder with the source code.<br><strong>Link:</strong> <a href="https://codecrawler.codeplex.com/">https://codecrawler.codeplex.com/</a><br><strong>Comments: </strong>It finds a lot of false positives and fails several times (crash!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*hXenm-GzYJuCSA6KdO-OhQ.png" /><figcaption>CodeCrawler — C#</figcaption></figure><h3>YASCA</h3><p><strong>For:</strong> .Net, Java, C/C++, HTML, JavaScript, ASP, ColdFusion, PHP, COBOL<br><strong>Setup:</strong> Install the msi.<br><strong>How to use:</strong> “yasca.exe application_path”<br><strong>Link:</strong> <a href="http://www.scovetta.com/yasca.html">http://www.scovetta.com/yasca.html</a><br><strong>Comments: </strong>It is a multi-language scanner. It finds a lot of false positives. It finds some bad practices too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*wC3_bknPftJdCw5Z-0E_vw.png" /><figcaption>Yasca — .Net, Java, C/C++, HTML, JavaScript, ASP, ColdFusion, PHP, COBOL</figcaption></figure><h3>Visual Code Grepper</h3><p><strong>For:</strong> C++, C#, VB, PHP, Java and PL/SQL<br><strong>Setup:</strong> Install the msi.<br><strong>How to use:</strong> Open the application and select the source code.<br><strong>Link:</strong> <a href="https://sourceforge.net/projects/visualcodegrepp/">https://sourceforge.net/projects/visualcodegrepp/</a><br><strong>Comments: </strong>It is a multi-language scanner too. It finds a lot of false positives, but less than YASCA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*-vNmy7REjlK8_u9UbcLU7Q.png" /><figcaption>Visual Code Grepper — C++, C#, VB, PHP, Java and PL/SQL</figcaption></figure><h3>Graudit (Only Linux)</h3><p><strong>For:</strong> ASP, JSP, Perl, PHP, Python<br><strong>Setup:</strong> Download and execute.<br><strong>How to use:</strong> “graudit application_path”.<br><strong>Link:</strong> <a href="https://github.com/wireghoul/graudit">https://github.com/wireghoul/graudit</a><br><strong>Comments: </strong>This scanner uses a knowledge base based in regular expressions. The most advantage is that can be easily customize to find custom issues. Using the default base, I did not get good results, a lot of false positives web found, and many real issues were not identified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*c1p9fv9xeo8eHS_gvr4OCA.png" /><figcaption>Graudit — C++, C#, VB, PHP, Java and PL/SQL</figcaption></figure><h3>Code Warrior (Only Linux)</h3><p><strong>For:</strong> C, C#, PHP, Java, Ruby, ASP, JavaScript<br><strong>Setup:</strong> Download and compiled it using “make”.<br><strong>How to use:</strong> Open the application and select the source code.<br><strong>Link:</strong> <a href="https://github.com/CoolerVoid/codewarrior">https://github.com/CoolerVoid/codewarrior</a><br><strong>Comments: </strong>Like RIPS this scanner is a web application. But we do not need Apache, only run the scanner, and the browser will be opened. Then we have to select the source code. In my opinion, and based in the results, this “multi” scanner is the best option. It find a lot of issues, and a low rate of false positives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*FwszsSIu9TP9_TYi3VWh1Q.png" /><figcaption>Code Warrior — C, C#, PHP, Java, Ruby, ASP, JavaScript</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d39abe36e5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pineapple 101: Modules’ Review and Testing (Part 2)]]></title>
            <link>https://medium.com/@maxpowersii/pineapple-101-modules-review-and-testing-part-2-600538b492aa?source=rss-c8138ad80d5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/600538b492aa</guid>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Maxpower]]></dc:creator>
            <pubDate>Mon, 24 Jul 2017 14:43:33 GMT</pubDate>
            <atom:updated>2017-07-24T14:43:33.464Z</atom:updated>
            <content:encoded><![CDATA[<p>Two weeks ago, we published <a href="https://medium.com/@edelpeon_33472/pineapple-101-modules-review-and-testing-part-1-c2afebba6ba0">Pineapple 101: Modules’ Review and Testing (Part 1)</a>. We did a quick review about the Pineapple and we analyzed 3 modules. The API Token module, which allows users to control the Pineapple through a REST Api. The PineAP module, which allows users to create fake open access point. And finally, DNSMasq Spoof, a good module to create a fake DNS server, and redirect some domains and subdomains to our custom fake page. Now, we continue with our review about this “hacking fruit”, the Pineapple. This time we are going to analyze 3 modules more.</p><h3>4. Dwall</h3><p>The Dwall module provides us a local HTTP proxy that we can use to sniff the following information:</p><ul><li>HTTP URLs</li><li>Cookies</li><li>Data (the content of HTTP POST)</li><li>Images</li></ul><p>It does not require any additional configuration. We only need to activate PineAP, (You can go back to our previous post to check how to use it) and wait for clients. To enable it, we have to follow the following steps:</p><ol><li>Click the “Enable” button.</li><li>Click the “Start Listening” button.</li><li>Now, Dwall is running!.</li></ol><p>It looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/0*yATwHiPvPB-rRqAU." /></figure><p>This module sounds awesome but… the first problem is that all information is mixed!. We cannot identify the data (cookie, URL, etc.) owner.</p><p>Now, let’s go to see what we can do with the sniffed data:</p><ul><li>In the <strong>URLs </strong>panel, we can “spy” all visited websites, and try to find GET parameters, like emails, usernames and session tokens:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*RYdJXpKwRHaHOhctpk-ukA.png" /></figure><ul><li>In the <strong>Cookies </strong>panel, we can find all clients’ cookies. We can try to find some sensitive information, like usernames or sessions Ids. A lot of websites save the user’s password in a cookie (think about a bad implementation of “remember” function), so we can try to get some password from them:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*yzHBPYtw6Q44xiESL8KPQg.png" /></figure><ul><li>In the <strong>Data </strong>panel, we are going to find, all POST parameters. We can try to find usernames and password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*oDmx7dRP-4oXcHbwpBtXJA.png" /></figure><ul><li>And the last one, the <strong>Images </strong>panel. It shows us all images browsed by the clients, this panel is not very useful, but maybe it could be the most funny.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*_k8teNWXsTCjCQHno7nrPg.png" /></figure><p>Finally, we can say that Dwall module is very good to sniff traffic, but we can only sniff non-encrypted HTTP traffic. So, how can we sniff HTTPS? To do that we’ll need another module, let’s check it out.</p><h3>5. SSLsplit</h3><p>Like Dwall, the main objective of this module, is to create a proxy, and sniff all HTTP and HTTPS traffic. It works using a custom SSL/TLS certificate to send to the browser (like BURP or Owasp ZAP). In this way, the module will be able to decrypt and sniff all traffic between the browser and the proxy.</p><p>Now we understand what we can do with this module, let’s test it. If this is the first time that we use it, before starting the module, we need to do two things. First, we need to install the dependencies, clicking the button “Not installed” (in red). After that, we need to generate the SSL certificate. To do that we have to click the button “Not generated” (in red). After installing the dependencies and generating the certificate, we will get two green buttons:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*QnEEaQ5dHGMltIcdkjCG4g.png" /><figcaption>We can make it start during the boot process using the option “Start on boot”, this is a useful option, if we want to use the Pineapple with a battery and go around to get some “clients”.</figcaption></figure><p>Now, we can start the module by clicking the “Start” button. (Remember to enable the PineAP module, to allow clients to connect to the fake access point) .</p><p>This module has got a panel called “Configuration”. It contains all necessary “iptables redirects” to get the module work. We do not need to change anything there.</p><p>Now, we have all configured and the module is sniffing the traffic. Let’s see what happens in the victim’s browser when s/he tries to visit a HTTPS site:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/0*2C0i353TSHLSJpEy." /></figure><p>We can observe that the browser warns the victim about the invalid certificate. However, if the victim is not secure-wise or if s/he deliberately accepts our certificate the browser will show the site. Remember that, if the website implements HSTS, and the victim has browsed the website before, the browser will not allow her/him to continue. In this case, we decided to continue, and the website is shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*8GeIGfVfeiZesnuS." /></figure><p>Well, we tested the module, but where is all sniffed data? We have to return to the Pineapple and check the Output panel, where we can find all the sniffed data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wDCWDKljNArfAwga." /><figcaption>Remember check the “Auto-refresh” options, to avoid, clicking in “Refresh Log” button each time</figcaption></figure><p>Another interesting section where we can find the sniffed data is the History panel. In there place, we can find the history of all sniffed traffic separated by date and time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9ah1Kf7O_FRFpYHv." /></figure><p>SSLsplit is the most useful MitM module for the Pineapple, but we can find some issues using it. First of all, it is nice to sniff the HTTPS traffic, but compared with Dwall, inspecting the output is a mess, because Dwall has got many panels with the intention of separate the data (URLs, cookies, POST), and this module only has got all requests in a txt file. Other problem, or I must say, the other big “enemy”, is the SSL Pining. If we want to sniff some traffic from mobile devices like Android cellphones, most of applications implement SSL Pining. This kind of applications, before establishing the data exchange, they check the server certificate comparing with the certificate built-in inside the application. So this module will not work for applications that uses SSL Pinning, but it will work for the mobile browser. And finally, the “nemesis” of this module is HSTS. All sites that implement HSTS, and they have been loaded in the client’s browser before start the module, could not be accessed, because the browser remember the first certificate, and compare all next certificates with that. A good solution to this problem, would be use SSLstrip2, we can use it in console, but we do not have an official module for this.</p><h3>6. EvilPortal</h3><p>Our last module!. We have analyzed two MitM module, but the last one is not about MitM, it is about “social engineering” and “phishing”. The evil portal module, provides us with a captive portal for all clients in the Pineapple. All new connections through the PineAp, will be redirected to the captive portal, even if the user writes an URL directly in the browser. The clients will not be able to reach internet until they “accept” the captive portal. After accepting it, they will be redirected to the original URL. Thinking in the real world, this module could be useful to simulate an open network from a shop or company, and try to get some credentials.</p><p>Now that we understand what this module does, let’s go and configure it. The module has got five interesting areas:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bQCmOYXcR_DyzK1M." /></figure><ul><li><strong>Controls </strong>area allows us to start the module, and activate the start boot option, if we want to plug the Pineapple and start this module, for example connect it to a battery and go around the neighborhood.</li><li><strong>Evil Portal Messages</strong> area shows some “interesting” messages, like when a new client accepts the captive portal.</li><li><strong>White List</strong> area, allows us to input IPs, to avoid the captive portal, and reach internet immediately after that the client connect. For example we can use this area, to input our control device’s IP, to avoid the captive portal in the device that we use to control the Pineapple.</li><li><strong>Authorized Clients</strong> area shows all IPs authorized to reach internet, because they accepted the captive portal.</li><li>The last area, <strong>Workbench</strong>, is the most important, it allows us to create the captive portal! Let’s go through it.</li></ul><p>First of all, we have to create a portal. After that, we can edit, delete or activate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*X8--pM54IxmHujT0TZfgxA.png" /><figcaption>We can only have one activated portal</figcaption></figure><p>If we click on the portal’s name, we can edit it. We have two important files inside the portal, “index.php” and “MyPortal.php”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*EuNPJMw7BqB2SxX7u-ie4A.png" /></figure><p>The file called “index.php” contains the captive portal itself. It contains some PHP code, and HTML code. Here we can place our own HTML code, for example we can create a “Coffee page”, like if our wireless network would be from a coffee shop, and request for specific credentials, like Google or Facebook.</p><p>The most important things in our “index.php” file are:</p><ul><li>Do not delete the two first lines of PHP code.</li><li>Do not delete the Javascript code.</li><li>Do not delete the hidden input inside the form.</li><li>The form must go (through POST) to “/captiveportal/index.php”.</li></ul><p>Let’s check an example of the “index.php” file:</p><pre>&lt;?php<br>$destination = &quot;http://&quot;. $_SERVER[&#39;HTTP_HOST&#39;] . $_SERVER[&#39;HTTP_URI&#39;] . &quot;&quot;;<br>?&gt;</pre><pre>&lt;HTML&gt;<br>    &lt;HEAD&gt;<br>        &lt;title&gt;Starbucks WiFi&lt;/title&gt;<br>        &lt;script type=&quot;text/javascript&quot;&gt;<br>            function redirect() { <br>                setTimeout(function()<br>                {window.location = &quot;/captiveportal   <br>                /index.php&quot;;},100);<br>            } <br>        &lt;/script&gt;<br>    &lt;/HEAD&gt;<br>    &lt;BODY&gt;<br>        &lt;center&gt;<br>            &lt;h1&gt;Free Wifi&lt;/h1&gt;<br>            &lt;form method=&quot;POST&quot; action=&quot;/captiveportal/index.php&quot;       <br>             onsubmit=&quot;redirect()&quot;&gt;<br>                &lt;input type=&quot;hidden&quot; name=&quot;target&quot; value=&quot;  <br>                 &lt;?=$destination?&gt;&quot;&gt;<br>                &lt;button type=&quot;submit&quot;&gt;Accept &amp; Connect using your <br>                 google account&lt;/button&gt;<br>                &lt;p&gt;I agree to the Terms of Service and have   <br>                    reviewed the Google Privacy Policy&lt;/p&gt;<br>            &lt;/form&gt;<br>        &lt;/center&gt;<br>    &lt;/BODY&gt;<br>&lt;/HTML&gt;</pre><p>After the changes, we can save the page. Now we need to edit the second file, “MyPortal.php”. It contains a PHP class, we only are interesting in change the “handleAuthorization” method. In this method, we can get the POST data and save it into a txt file, using $_POST array and fopen function, for example:</p><pre>&lt;?php namespace evilportal;</pre><pre>class MyPortal extends Portal<br>{</pre><pre>public function handleAuthorization()<br>    {<br>        // Call parent to handle basic authorization first<br>        parent::handleAuthorization();</pre><pre>       // Check for other form data here</pre><pre>       $username = $_POST[“username”];<br>       $password = $_POST[“password”];<br>       $myfile = fopen(“output.txt”, “w”);<br>       fwrite($myfile, $username . “-” . $password);<br>       fclose($myfile);<br>    }</pre><p>Well, we have finished our captive portal, let’s test it. We have created a open network called “Starbucks WiFi”. Now we are going to connect using a mobile device:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/0*LAnS-RWM66VkK4Af." /><figcaption>The operative system alert us about the captive portal.</figcaption></figure><p>Now, we are going to connect using a laptop and try to browse some site., why not <a href="http://www.medium.com/">www.medium.com</a>?. <a href="http://www.wordreference.com/fres/voil%C3%A0">Voilà</a>!, We got the captive portal!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*VRtkfygsZm56KroJuDqJQg.png" /></figure><p>Finally we can say that this is a useful module, but it has got some problems. First of all when the client accepts the captive portal, it does not redirect to the requested page. And second, if the client tries to access to some HTTPS page using “https” in the URL, the captive portal will not be shown, and the request will be allowed.</p><h3>Next steps</h3><p>This is the second part of our review, we are working in the part 3 that will contain our analysis of how to create modules, and new modules for the community.</p><p>For comments, input, feedback, etc.: <a href="https://medium.com/u/3a4422724ccd">Emiliano</a>, <a href="https://medium.com/u/c8138ad80d5d">Maxi</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=600538b492aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>