<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2770464801800569532</id><updated>2026-03-26T19:36:55.409-05:00</updated><category term="cybersecurity"/><category term="malware"/><category term="security"/><category term="hackem"/><category term="hacking"/><category term="malware analysis"/><category term="owasp"/><category term="tools"/><category term="linux"/><category term="reverse engineering"/><category term="web apps"/><category term="web security"/><category term="antivirus"/><category term="cli"/><category term="cracking"/><category term="download"/><category term="kali"/><category term="owasp top 10"/><category term="password"/><category term="pentesting"/><category term="reverse engineer"/><category term="script"/><category term="adobe"/><category term="banker"/><category term="base64"/><category term="bing"/><category term="broken access control"/><category term="bypass"/><category term="challenge"/><category term="computer research"/><category term="cookies"/><category term="crypto"/><category term="cryptography"/><category term="ctf"/><category term="ctf365"/><category term="cve"/><category term="cybersecurity for the next generation"/><category term="ddos"/><category term="debian"/><category term="debugger"/><category term="defacement."/><category term="dos"/><category term="dropper"/><category term="eicar"/><category term="encoding"/><category term="escuela politecnica nacional"/><category term="eset"/><category term="fake virus"/><category term="fedora"/><category term="getting started"/><category term="hack me"/><category term="hex"/><category term="hydra"/><category term="infection"/><category term="injection"/><category term="kaspersky lab"/><category term="linux lite"/><category term="linux mint"/><category term="login"/><category term="management"/><category term="password cracking"/><category term="perl"/><category term="research"/><category term="sandbox"/><category term="session management"/><category term="social engineering"/><category term="spreading"/><category term="sql"/><category term="sqli"/><category term="stegano"/><category term="steganography"/><category term="terminal"/><category term="test case"/><category term="trojan"/><category term="tutorial"/><category term="ubuntu"/><category term="vulnerability"/><category term="wireshark"/><category term="writeup"/><category term="xss"/><title type='text'>Ethical Hacking, Malware Analysis, Disinfection Techniques and more...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-3160063839627309025</id><published>2023-06-08T15:51:00.036-05:00</published><updated>2023-06-19T01:43:52.691-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cve"/><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp"/><category scheme="http://www.blogger.com/atom/ns#" term="pentesting"/><category scheme="http://www.blogger.com/atom/ns#" term="research"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability"/><category scheme="http://www.blogger.com/atom/ns#" term="web security"/><title type='text'>CVE-2023-34096: Path Traversal Vulnerability in Thruk Monitoring Web Interface</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;492&quot; data-original-width=&quot;427&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsGAFRLk_abgVZtaiowbTpZwtXoelpHVjYANWBXZcaUcslIT1oLclwZoo8kge96F4GBfMMknXu769DZnRPBgFYFTd_dULOLu88MtQJV1vOmbPtTBFJVwLTQcrGv0QPLfwU3PmjMd7m5S5TnOMBhtZCuYlJJRyPLEqCTsj9BkMsQrSrzDf_AFdMevH6Sg/s320/Thruk-Logo.png&quot; width=&quot;278&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Important Note:&lt;/b&gt; All of the findings listed here were previously reported to the manufacturer of the software.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;As part of the responsible disclosure policy, we waited for a response of the manufacturer (confirming the vulnerability, issuing a patch, or accepting that they won&#39;t solve the finding) before sharing this post.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;520&quot; data-original-width=&quot;1726&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLBHJiTVk9Q1sLhwfcPXRP-NzxaGq_4WOfpbZtb1B1YZ59OUNkmLffyjuNAIr_0VvSLmBExh_cASVKR6sMQF6QZL7af0ReT8jgoK84hx4zE1x6JRhPpNZY0X2BMFaLfDIEIZGu66KfAVdlLYDBuHgy0cIiS_nSSGnb-Ukkclt5QBr0mK4mH3i241D0tg/w610-h183/Thruk-Monitoring-Software.png&quot; width=&quot;610&quot; /&gt;&lt;/div&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;During a Penetration Test performed to a Security Company I was able to identify certain findings that could affect the popular &lt;b&gt;Thruk Monitoring Web Interface&lt;/b&gt;. So, after analyzing the &lt;b&gt;GitHub&lt;/b&gt; repository and performing some tests on the target environment, I was able to &lt;b&gt;identify&lt;/b&gt; and &lt;b&gt;exploit&lt;/b&gt; the vulnerabilities, then I reported these issues to the manufacturer.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The file &lt;b&gt;panorama.pm&lt;/b&gt; is vulnerable to a Path Traversal Vulnerability which allows a remote authenticated attacker to upload arbitrary files to any folder which has write permissions on the affected system. This vulnerability affects all versions of &lt;b&gt;Thruk&lt;/b&gt; even the one that was recently published (&lt;b&gt;&amp;lt;=3.06&lt;/b&gt;) in &lt;b&gt;May 24, 2023&lt;/b&gt;.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Details&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The parameter &quot;&lt;b&gt;location&lt;/b&gt;&quot; is not filtered, validated or sanitized and it accepts any kind of characters. For a path traversal attack, the only characters required were the dot (&lt;b&gt;.&lt;/b&gt;) and the slash (&lt;b&gt;/&lt;/b&gt;).&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This was verified by analyzing in detail the &lt;b&gt;&lt;a href=&quot;https://github.com/sni/Thruk&quot; target=&quot;_blank&quot;&gt;GitHub repository&lt;/a&gt;&lt;/b&gt; and the source files.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In this step, the &lt;b&gt;location&lt;/b&gt; is received from the parameters sent by the client through the web request and there is no sanitization at all.&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/sni/Thruk/blob/1bc5a5804bf9fc22e82a4eadb21a1795954f0867/plugins/plugins-available/panorama/lib/Thruk/Controller/panorama.pm#L690&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;96&quot; data-original-width=&quot;669&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJjDLgdlFrUz_aNXE8Pbqn86oqSn2VJYAIwuAecy9v4GTTc2AL1pXI1WQOtLi86-MT_VGkuEinBqM1RZmy27vbq1TCZRtAb0XOzqgqJBkwx5s2LqKHfeYedv4i22qfAix60QKRcKGON-npaDJZe-XpjHImZHt7uiBc9wjOdjGuIQpnFido7S3Ha50LGg/w577-h83/location-variable-no-sanitization.png&quot; width=&quot;577&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Then, the variable &lt;b&gt;folder&lt;/b&gt;&amp;nbsp;is constructed doing a basic concatenation without any sanitization.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/sni/Thruk/blob/1bc5a5804bf9fc22e82a4eadb21a1795954f0867/plugins/plugins-available/panorama/lib/Thruk/Controller/panorama.pm#L705&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;100&quot; data-original-width=&quot;733&quot; height=&quot;80&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEhaWWgppdNJxbVZQAwTJRcgQ9eBBKRX05AinEp3a9_JBQ7X2D0os6WtnybZCfY0oTDFtdtGYzZuLhaXBR8h6Ju1JXkoIWsr0x5jnoAG7GoHRMJFCFGFbepVytKjnPZUQ6Wo_ESdcYiZt-su4WT8dn00jTk-qb7MnSJuFom5mWxwvC0NDj57UPq3xdBQ/w581-h80/folder-variable-no-sanitization.png&quot; width=&quot;581&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Next, the &lt;b&gt;folder &lt;/b&gt;variable is concatenated with the &lt;b&gt;filename&lt;/b&gt;&amp;nbsp;and its result is stored in the &lt;b&gt;newlocation&lt;/b&gt; variable, again no sanitization at all.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/sni/Thruk/blob/1bc5a5804bf9fc22e82a4eadb21a1795954f0867/plugins/plugins-available/panorama/lib/Thruk/Controller/panorama.pm#L727&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;97&quot; data-original-width=&quot;673&quot; height=&quot;84&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTnV0c5mPv-YhQ6hbyK6jTZKCEgP8_4ZXLNlM9Zm4y0RUv4Z4YZzgVHPGVbQiDlfnfQclUGt_ucdRFCStt8w6pMWFGrlT7waLoVdbiUAudQpt4ioAus4sghNsXQJH8sGLb78erzOmJAFGcP_F_PewtZKLEvYoyjDSsQpEbz3VYSOkGpffVpuCjAGIBA/w589-h84/newlocation-variable-no-sanitization.png&quot; width=&quot;589&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Finally, here the uploaded file is moved to the desired folder.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/sni/Thruk/blob/1bc5a5804bf9fc22e82a4eadb21a1795954f0867/plugins/plugins-available/panorama/lib/Thruk/Controller/panorama.pm#L735&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;94&quot; data-original-width=&quot;667&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoy2xHPUi9_FzJqHnhnWC35wizBWUvTHMSaFH-fJJBCJ1fOnkoPRlSaoUwtgL2NL8WB5qud2dvzCszjB-uabikk_TC6VVv8SkeuhY1W8-fqm6OHKch67iGHbFI-1f8sCLg39ixNKRp042t3uNOznChNq8CoxYC1KYPFzFe0fAmy5zXMM3uPsC4aJWIA/w593-h83/move-file-no-sanitization.png&quot; width=&quot;593&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Through this flow, it is easy to see that due to the lack of sanitization we can manipulate the &lt;b&gt;location &lt;/b&gt;parameter and exploit a Path Traversal vulnerability to upload a file to any folder we want.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Proof of Concept (PoC)&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Go to the form where we can upload an image that will be used as background for a Dashboard.&lt;/li&gt;&lt;li&gt;Select any file with the allowed extensions and intercept the request with Burp Suite.&lt;/li&gt;&lt;li&gt;Modify the location parameter which is the &lt;b&gt;backgrounds/&lt;/b&gt; string and replace it with something like &lt;b&gt;backgrounds/../../../../tmp/&lt;/b&gt;&lt;/li&gt;&lt;li&gt;You will receive a message that the file was uploaded successfully.&lt;/li&gt;&lt;li&gt;Check your &lt;b&gt;/tmp/&lt;/b&gt; folder and verify the presence of the file.&lt;/li&gt;&lt;/ol&gt;As part of the PoC, I decided to include the following screenshots.&lt;br /&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Normal Case&lt;/b&gt;&lt;/h4&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In this first screenshot I included the normal request where a file will be uploaded to a folder where the current user does not have any write permissions, and I received an error message.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhow8j0wwXvJW94Ro3olM4t6-jjyXyXGe-cYv0KVGOkdGF2PHmPV0Jb-Hjw8s-ieTuvFRlR9xBij07-iwmuO74szfAC-ucuWXoWLEln1u2yplvbIVOuMrquofKsr_jy6ZDyxMfK8AlaGOdrUrBovZZkPrYv_ZX9m2gOQuD9ueXDufDWGCe1phV3Vq8hiQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;701&quot; data-original-width=&quot;2238&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhow8j0wwXvJW94Ro3olM4t6-jjyXyXGe-cYv0KVGOkdGF2PHmPV0Jb-Hjw8s-ieTuvFRlR9xBij07-iwmuO74szfAC-ucuWXoWLEln1u2yplvbIVOuMrquofKsr_jy6ZDyxMfK8AlaGOdrUrBovZZkPrYv_ZX9m2gOQuD9ueXDufDWGCe1phV3Vq8hiQ=w620-h194&quot; width=&quot;620&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Path Traversal Exploitation&lt;/b&gt;&lt;/h4&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In this second screenshot I included the manipulated request where the path traversal vulnerability is being exploited to upload the file to &lt;b&gt;/tmp/&lt;/b&gt; folder, as you can see I received a success message.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8fKYm1kJA1PsNRIRI2qUvtV1XOa8rBLkbEDE0E5hUW8aSwvsCpxUpVHPKKRmtWzosXmsDoeJdjv00dDbgJr7EVocQHmaMZuMQRR7ntSUXJyQfI3fxN1ddrZkq29M0LbHoQSQvwR8aEZJI-Y7OWSZsvyXy_KBh-mDzKZUS6QwDy-2u-Fy2RAxzpn0rIg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;721&quot; data-original-width=&quot;2248&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8fKYm1kJA1PsNRIRI2qUvtV1XOa8rBLkbEDE0E5hUW8aSwvsCpxUpVHPKKRmtWzosXmsDoeJdjv00dDbgJr7EVocQHmaMZuMQRR7ntSUXJyQfI3fxN1ddrZkq29M0LbHoQSQvwR8aEZJI-Y7OWSZsvyXy_KBh-mDzKZUS6QwDy-2u-Fy2RAxzpn0rIg=w621-h200&quot; width=&quot;621&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;CVSS&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;The NIST NVD assigned a &lt;b&gt;CVSS 3.1&lt;/b&gt; Score of &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;8.8 (High)&lt;/span&gt;&lt;/b&gt; to this vulnerability.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;The CNA GitHub, Inc. assigned a &lt;b&gt;CVSS 3.1&lt;/b&gt; Score of &lt;b&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;6.5 (Medium)&lt;/span&gt;&lt;/b&gt; to this vulnerability.&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check&amp;nbsp;&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;NIST NVD&lt;/a&gt;&amp;nbsp;for further details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Impact&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;A Path Traversal vulnerability allows an attacker to upload arbitrary files to the server. The attacker can overwrite existing files on the system and cause a defacement (replacing legitimate images on the web server) or simply can upload random files to fill the disk completely and affect the availability and correct status of the platform.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;It is well known that a Path Traversal Vulnerability in certain cases can allow an attacker to upload a webshell and gain Remote Code Execution (RCE) on the affected host, which could lead to a Complete System Takeover.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This vulnerability affects all versions of Thruk even the one that was published 15 days ago (3.06) in&amp;nbsp;May 24, 2023;&lt;b&gt;&amp;nbsp;&lt;/b&gt;so the impact is bigger as this issue affects all instances of Thruk around the world.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This was reported through a &lt;b&gt;Security Advisory&lt;/b&gt; via &lt;b&gt;GitHub&lt;/b&gt;. You can find the security advisory report and other useful references in the following links:&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/sni/Thruk/security/advisories/GHSA-vhqc-649h-994h&quot; target=&quot;_blank&quot;&gt;https://github.com/sni/Thruk/security/advisories/GHSA-vhqc-649h-994h&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/galoget/Thruk-CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;https://github.com/galoget/Thruk-CVE-2023-34096&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-34096&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.exploit-db.com/exploits/51509&quot; target=&quot;_blank&quot;&gt;https://www.exploit-db.com/exploits/51509&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://packetstormsecurity.com/files/172822/Thruk-Monitoring-Web-Interface-3.06-Path-Traversal.html&quot; target=&quot;_blank&quot;&gt;https://packetstormsecurity.com/files/172822/Thruk-Monitoring-Web-Interface-3.06-Path-Traversal.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;https://nvd.nist.gov/vuln/detail/CVE-2023-34096&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://cve.report/CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;https://cve.report/CVE-2023-34096&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://vulmon.com/vulnerabilitydetails?qid=CVE-2023-34096&amp;amp;scoretype=cvssv3&quot; target=&quot;_blank&quot;&gt;https://vulmon.com/vulnerabilitydetails?qid=CVE-2023-34096&amp;amp;scoretype=cvssv3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://vuldb.com/?id.231110&quot; target=&quot;_blank&quot;&gt;https://vuldb.com/?id.231110&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://twitter.com/CVEnew/status/1666897976894054415&quot; target=&quot;_blank&quot;&gt;https://twitter.com/CVEnew/status/1666897976894054415&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.thruk.org/changelog.html#_v3-062&quot; target=&quot;_blank&quot;&gt;https://www.thruk.org/changelog.html#_v3-062&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Vulnerability Summary&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Assigned CVE:&lt;/b&gt;&amp;nbsp;CVE-2023-34096&lt;/li&gt;&lt;li&gt;&lt;b&gt;CVE Author:&lt;/b&gt;&amp;nbsp;Galoget Latorre (&lt;a href=&quot;https://github.com/galoget&quot; target=&quot;_blank&quot;&gt;@galoget&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Severity (NIST):&lt;/b&gt;&amp;nbsp;8.8 High&lt;/li&gt;&lt;li&gt;&lt;b&gt;Severity (GitHub):&lt;/b&gt; 6.5 Medium&lt;/li&gt;&lt;li&gt;&lt;b&gt;Type:&lt;/b&gt;&amp;nbsp;Path Traversal&lt;/li&gt;&lt;li&gt;&lt;b&gt;Product:&lt;/b&gt; Thruk Monitoring Web Interface&lt;/li&gt;&lt;li&gt;&lt;b&gt;Affected Versions:&lt;/b&gt; All versions &amp;lt;= 3.06&lt;/li&gt;&lt;li&gt;&lt;b&gt;Patched Version:&lt;/b&gt; 3.06-2&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Timeline&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;2023-05-25: This vulnerability was identified by Galoget Latorre.&lt;/li&gt;&lt;li&gt;2023-06-02: Initial contact with maintainer via GitHub Security Advisory including vulnerability details and Proof of Concept (PoC).&lt;/li&gt;&lt;li&gt;2023-06-05: CVE-2023-34096 is assigned.&amp;nbsp;&lt;/li&gt;&lt;li&gt;2023-06-06: Maintainer releases a patch with version 3.06-2, see &lt;a href=&quot;https://www.thruk.org/changelog.html#_v3-062&quot; target=&quot;_blank&quot;&gt;Thruk&#39;s Changelog&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;2023-06-08: &lt;a href=&quot;https://github.com/sni/Thruk/security/advisories/GHSA-vhqc-649h-994h&quot; target=&quot;_blank&quot;&gt;GitHub Security Advisory&lt;/a&gt; is released by maintainer.&lt;/li&gt;&lt;li&gt;2023-06-08: Security advisory (this blog post) is released by Galoget Latorre.&lt;/li&gt;&lt;li&gt;2023-06-08: &lt;a href=&quot;https://github.com/galoget/Thruk-CVE-2023-34096&quot; target=&quot;_blank&quot;&gt;Exploit PoC&lt;/a&gt; is released by Galoget Latorre.&lt;/li&gt;&lt;li&gt;2023-06-09: Exploit PoC is shared by &lt;a href=&quot;https://www.exploit-db.com/exploits/51509&quot; target=&quot;_blank&quot;&gt;Exploit Database (Exploit-DB)&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;2023-06-09: Exploit PoC is shared by &lt;a href=&quot;https://packetstormsecurity.com/files/172822/Thruk-Monitoring-Web-Interface-3.06-Path-Traversal.html&quot; target=&quot;_blank&quot;&gt;Packet Storm Security&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Credits&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;This security vulnerability was identified by &lt;b&gt;Galoget Latorre&lt;/b&gt;, Security Consultant (Pentester) at Hackem Cybersecurity Research Group and Dreamlab Technologies.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/3160063839627309025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2023/06/cve-2023-34096-path-traversal-thruk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3160063839627309025'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3160063839627309025'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2023/06/cve-2023-34096-path-traversal-thruk.html' title='CVE-2023-34096: Path Traversal Vulnerability in Thruk Monitoring Web Interface'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsGAFRLk_abgVZtaiowbTpZwtXoelpHVjYANWBXZcaUcslIT1oLclwZoo8kge96F4GBfMMknXu769DZnRPBgFYFTd_dULOLu88MtQJV1vOmbPtTBFJVwLTQcrGv0QPLfwU3PmjMd7m5S5TnOMBhtZCuYlJJRyPLEqCTsj9BkMsQrSrzDf_AFdMevH6Sg/s72-c/Thruk-Logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-3686145164564385845</id><published>2018-01-08T07:32:00.005-05:00</published><updated>2018-01-09T03:29:52.704-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cli"/><category scheme="http://www.blogger.com/atom/ns#" term="cracking"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="hackem"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="hydra"/><category scheme="http://www.blogger.com/atom/ns#" term="kali"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="linux lite"/><category scheme="http://www.blogger.com/atom/ns#" term="linux mint"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp"/><category scheme="http://www.blogger.com/atom/ns#" term="password"/><category scheme="http://www.blogger.com/atom/ns#" term="password cracking"/><category scheme="http://www.blogger.com/atom/ns#" term="pentesting"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="web apps"/><category scheme="http://www.blogger.com/atom/ns#" term="web security"/><title type='text'>Cracking Passwords: Brute-force Attack with Hydra (CLI) + xHydra (GTK)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; data-original-height=&quot;720&quot; data-original-width=&quot;1280&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIsj81a4LIAWFYQW9HY_bEilk7OwtNAX2IchCc3AMjiuFQhSaSr4whQ2Kqk5Qnkrw2XQQMNxkKKcXwkSDQ1CFdSc521ksb3JqdWusv6uKuLsjYKrLTeKNwq28qt90UMivhtyXI2_EsHdc_/s400/hydra-bruteforce.jpg&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Recently on &lt;a href=&quot;https://security.stackexchange.com/&quot;&gt;Security StackExchange&lt;/a&gt;,&amp;nbsp;I saw a lot of people asking how to use properly THC Hydra for Password Cracking, so in this post I&#39;m going to explain how to install the command line utility, and also how to install the graphical user interface (GUI) for it. Then you can find step by step instructions on how to use this tool properly&amp;nbsp;to attack an &lt;code&gt;http-form-post&amp;nbsp;&lt;/code&gt;that simulates a Login form for a corporate website. Hope you enjoy this post as much as I did when I was writing it.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
How to Install THC Hydra on GNU Linux?&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
Debian-based distributions (Ubuntu, Linux Mint, Linux Lite):&lt;/h3&gt;
If you&#39;re using a &lt;a href=&quot;https://en.wikipedia.org/wiki/Category:Debian-based_distributions&quot;&gt;Debian-based GNU Linux distribution&lt;/a&gt;, you can easily install the tool and the GUI using the following command:&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;galoget@hackem:~$ sudo apt-get install hydra hydra-gtk
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrZBjn0Ccqfis8D-Qltp-elRH03doSXdstbsGngrzK5sA-p08WtxfriwpntEL_db4rsqvbHAO3vpKvtt4eD2w4mRXuQJbZscH1Y7uHGsgsM0ZWnM_Psve2v2I2n0PtfwdnREMmdTOqzTcR/s1600/1.installing-hydra-and-hyhdra-gtk-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;285&quot; data-original-width=&quot;732&quot; height=&quot;155&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrZBjn0Ccqfis8D-Qltp-elRH03doSXdstbsGngrzK5sA-p08WtxfriwpntEL_db4rsqvbHAO3vpKvtt4eD2w4mRXuQJbZscH1Y7uHGsgsM0ZWnM_Psve2v2I2n0PtfwdnREMmdTOqzTcR/s400/1.installing-hydra-and-hyhdra-gtk-galoget-hackem.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 1. Installing hydra and hydra-gtk in Ubuntu&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: start;&quot;&gt;
RPM-based distributions (Red Hat, CentOS, Fedora):&lt;/h3&gt;
On the other hand, if you&#39;re using a &lt;a href=&quot;https://en.wikipedia.org/wiki/Category:RPM-based_Linux_distributions&quot;&gt;RPM-based GNU Linux distribution&lt;/a&gt;, then you have to use this command:&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin: 24px 0px 0px; overflow: auto; padding: 4px 10px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[galoget@hackem ~]$ sudo dnf install hydra
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbGSiL_AY_7OK4JClNotJvZxrlbb5HHEbnN3NBSMSgseI_7pFgWClAmHQYLoiBtDV9XaZELxOvDcogFa0cwD0M-_wvfOL7zoswgf1M5X3FVWszxmyG23-PJhSGMPA6nJkBNcK4KpRT6c1/s1600/1.1.installing-hydra-and-hyhdra-gtk-galoget-hackem.png.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;499&quot; data-original-width=&quot;869&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbGSiL_AY_7OK4JClNotJvZxrlbb5HHEbnN3NBSMSgseI_7pFgWClAmHQYLoiBtDV9XaZELxOvDcogFa0cwD0M-_wvfOL7zoswgf1M5X3FVWszxmyG23-PJhSGMPA6nJkBNcK4KpRT6c1/s400/1.1.installing-hydra-and-hyhdra-gtk-galoget-hackem.png.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 2. Installing hydra in Fedora (hydra-gtk not available)&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Analyzing our Target Website&lt;/h2&gt;
In this step, we&#39;re going to analyze our target website from an attacker perspective, after this process, we&#39;ll use the collected information to prepare our attack.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydoNWLmdtCdyKQz0rkXtl6bsCpSwvnPAGOkZoH1G_oEzSpkmAZBekprkLGV9o2aViJoZij_p0x3sV3pHXQFkBf8xTK96mztD-8N9RDQEInTkwNH2-lHF9FgVNIP7rLHMyRXCn8pSsXagF/s1600/2.login-form-attacker-perspective-hydra-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;711&quot; data-original-width=&quot;474&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydoNWLmdtCdyKQz0rkXtl6bsCpSwvnPAGOkZoH1G_oEzSpkmAZBekprkLGV9o2aViJoZij_p0x3sV3pHXQFkBf8xTK96mztD-8N9RDQEInTkwNH2-lHF9FgVNIP7rLHMyRXCn8pSsXagF/s400/2.login-form-attacker-perspective-hydra-galoget-hackem.png&quot; width=&quot;266&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3. Target&#39;s website login form&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Information extracted:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Host: &lt;/b&gt;hackem&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Login form path:&lt;/b&gt; /hydra/login.php&lt;/div&gt;
&lt;br /&gt;
Now, let&#39;s check the source code to get more details about the web app:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOxS2w4nb4l1Xsqx3aR6TEsDlFyGLq2YnvXY4IA1uols98olXQQs1fVN29aFVtufIQ1-s4N1AmoxHLCkiVeRPBz-lYlyTK84cbeTP2UEbjIIh_fk1XVZoE7eAwitS_HE5sy7L1XpNtRCD7/s1600/3.login-form-source-code-attacker-perspective-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;608&quot; data-original-width=&quot;741&quot; height=&quot;327&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOxS2w4nb4l1Xsqx3aR6TEsDlFyGLq2YnvXY4IA1uols98olXQQs1fVN29aFVtufIQ1-s4N1AmoxHLCkiVeRPBz-lYlyTK84cbeTP2UEbjIIh_fk1XVZoE7eAwitS_HE5sy7L1XpNtRCD7/s400/3.login-form-source-code-attacker-perspective-galoget-hackem.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 4: Source code of the target&#39;s website login form&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
From Figure 4, we can extract the following information:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Form action:&lt;/b&gt; auth.php&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Method:&lt;/b&gt; POST&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Name attribute of username field:&lt;/b&gt; uname&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Name attribute of password field:&lt;/b&gt;&amp;nbsp;psw&lt;/div&gt;
&lt;br /&gt;
This is almost all the information we need to start our attack, let&#39;s see some basic behavior of the web app:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARbehsvPDB1fF0w3D8cR1i3dOrnKQ5eL89MdAiJWfEYtpyAnBCVftwzyk879LDX1oUc_tFfpgrVblbFkvHtaru9Lwg-xw_tW2GWNX8KoGbik54MUQmtvpIuTBumUsKkNtQjx0WZ2BRML7/s1600/4.user-authentication-login-form-hydra-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;711&quot; data-original-width=&quot;474&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARbehsvPDB1fF0w3D8cR1i3dOrnKQ5eL89MdAiJWfEYtpyAnBCVftwzyk879LDX1oUc_tFfpgrVblbFkvHtaru9Lwg-xw_tW2GWNX8KoGbik54MUQmtvpIuTBumUsKkNtQjx0WZ2BRML7/s400/4.user-authentication-login-form-hydra-galoget-hackem.png&quot; width=&quot;266&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5. Login into the web app, username: galoget, password: hackem&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
When we use the real credentials for our web app, the we get the message &lt;b&gt;&quot;Access Granted&quot;&lt;/b&gt;, otherwise we get the message &lt;b&gt;&quot;Access Denied&quot;&lt;/b&gt;, this last message is the one that is available for the attacker to see, and this is the last piece of information we need to start our password cracking attack.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEY7PKxFPnFK2aDKIhdUb6RpbAap8O0IoIWgo5nkFbI-K2AwLUQMNz4FtKDO7T_IsucXHwujoZlTHwtNW2dMeWyKrvSDy8pSjlmrQDPdHXPzq336J_f-a0mVDZ_K6jMnbvoU3b3S-PgqNd/s1600/5.access-granted-user-authentication-hydra-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;166&quot; data-original-width=&quot;474&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEY7PKxFPnFK2aDKIhdUb6RpbAap8O0IoIWgo5nkFbI-K2AwLUQMNz4FtKDO7T_IsucXHwujoZlTHwtNW2dMeWyKrvSDy8pSjlmrQDPdHXPzq336J_f-a0mVDZ_K6jMnbvoU3b3S-PgqNd/s400/5.access-granted-user-authentication-hydra-galoget-hackem.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 6. Success Case, logging in with a registered user in the system&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgZ3xJkny_JpzLxtpZ7T4rz0L4ID5tmRrM0_kBt2gevJH7u4vMTn0NEZylQ0CQoHcoxWwlMGIgiOQep5iOmgxJrajZyFXdEimF3vjyGNMtXvHltshyphenhyphenb2gg9_oPxB9brAhKnUJlYM8LwT8j/s1600/6.access-denied-user-authentication-hydra-galoget-hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;166&quot; data-original-width=&quot;474&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgZ3xJkny_JpzLxtpZ7T4rz0L4ID5tmRrM0_kBt2gevJH7u4vMTn0NEZylQ0CQoHcoxWwlMGIgiOQep5iOmgxJrajZyFXdEimF3vjyGNMtXvHltshyphenhyphenb2gg9_oPxB9brAhKnUJlYM8LwT8j/s400/6.access-denied-user-authentication-hydra-galoget-hackem.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 7. Fail Case, logging in with an unknown user for the system&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Brute-forcing with hydra (CLI)&lt;/h2&gt;
&lt;div&gt;
At this stage we need to use all the collected information to fill all the required parameters in THC Hydra, the basic structure is:&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: left; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;hydra &amp;lt;HOSTNAME&amp;gt; &amp;lt;PROTOCOL/METHOD&amp;gt; -m &quot;&amp;lt;/PATH/TO/AUTH/FILE&amp;gt;:&amp;lt;USERNAME_FIELD&amp;gt;=^USER^&amp;amp;&amp;lt;PASSWORD_FIELD&amp;gt;=^PASS^:&amp;lt;ERROR_MESSAGE&amp;gt;&quot; -L listOfUsers.txt -P listOfPasswords.txt -t 10 -w 30 -o &amp;lt;OUTPUT_FILENAME&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;HOSTNAME&amp;gt;:&lt;/b&gt; URL or IP address of your target, DON&#39;T USE http:// or https:// in this field.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;PROTOCOL/METHOD&amp;gt;:&lt;/b&gt; The type of attack/protocol that you want to use.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;/PATH/TO/AUTH/FILE&amp;gt;:&lt;/b&gt; Path to the file that receives the form data.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;USERNAME_FIELD&amp;gt;:&lt;/b&gt; Name attribute of username field.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;PASSWORD_FIELD&amp;gt;:&lt;/b&gt;&amp;nbsp;Name attribute of password field.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;ERROR_MESSAGE&amp;gt;:&lt;/b&gt; The error message that you get when the login process fails, so Hydra could keep trying and identify when the brute-force attack succeeds.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&amp;lt;OUTPUT_FILENAME&amp;gt;:&lt;/b&gt; The filename where you&#39;re going to save the results of the attack.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Our complete command (ready to COPY &amp;amp; PASTE) with all the required parameters should look like this (Valid for Debian-based and RPM-based GNU Linux distributions):&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: left; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;galoget@hackem:~$ hydra hackem http-form-post -m &quot;/hydra/auth.php:uname=^USER^&amp;amp;psw=^PASS^:Access Denied&quot; -L users.txt -P pass.txt -t 10 -w 30 -o hydra-http-post-attack.txt
&lt;/pre&gt;
After executing the attack, we can see our results in the following image.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQP-pamhlFAWtUMZJVJYHFDrVuoNazl6I-x6kwzZS9Ygq9ImnXUnXdkfU8iBbwjaszu4WSFLsWFOuEY9O1x54atEOdSgWe2BoUDoj4frvNWKl1M-HfqlmyluOVlPq9b4H_uj25L6wXW19u/s1600/7.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-success-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;240&quot; data-original-width=&quot;957&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQP-pamhlFAWtUMZJVJYHFDrVuoNazl6I-x6kwzZS9Ygq9ImnXUnXdkfU8iBbwjaszu4WSFLsWFOuEY9O1x54atEOdSgWe2BoUDoj4frvNWKl1M-HfqlmyluOVlPq9b4H_uj25L6wXW19u/s400/7.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-success-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 8. Executing hydra with all the required parameters, at this point we&#39;re brute-forcing the authentication process in our target&#39;s website&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In Figure 8, you can see that we succeed on cracking the login form authentication, and as I mentioned before, the username was &lt;i&gt;galoget &lt;/i&gt;and the password was &lt;i&gt;hackem&lt;/i&gt;. We can also check our logfile with the cat command.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjztHsp-odhv8YI0UGV0y6QpXMo-Xx_DpWQfvcAKLLOqAwW05JCbr1mowHAFfqWDY__pGmQV1HMuSpqhxXF9sQkuf4iTeAjIeUSLAH2lceogRhE0sK2KJ9lwJyNZc-qJ4o45FCRwOmD4CP9/s1600/8.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-logs-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;140&quot; data-original-width=&quot;957&quot; height=&quot;57&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjztHsp-odhv8YI0UGV0y6QpXMo-Xx_DpWQfvcAKLLOqAwW05JCbr1mowHAFfqWDY__pGmQV1HMuSpqhxXF9sQkuf4iTeAjIeUSLAH2lceogRhE0sK2KJ9lwJyNZc-qJ4o45FCRwOmD4CP9/s400/8.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-logs-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 9. Checking our hydra&#39;s logfile&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Update (08-Jan-2018):&lt;/h3&gt;
Some users asked me how to make the tool works if the error message is:&amp;nbsp;&lt;b&gt;&quot;Error: Cannot find user record&quot;,&amp;nbsp;&lt;/b&gt;see the image below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaHnNmE2ZhwzpJ5H-B7FQgvu8XQak924urIykTAkkZBIVxoYSkZx6xslAnBgOd6Gz17TcMxZnXmxseFOrhHbr73ef7mCQr1_H5IkmESmdI4i4T1o2FCR-RRBTs4_dl-323GY47f2_NjtSN/s1600/8.1.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-updated-error-message-galoget.png.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;140&quot; data-original-width=&quot;400&quot; height=&quot;112&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaHnNmE2ZhwzpJ5H-B7FQgvu8XQak924urIykTAkkZBIVxoYSkZx6xslAnBgOd6Gz17TcMxZnXmxseFOrhHbr73ef7mCQr1_H5IkmESmdI4i4T1o2FCR-RRBTs4_dl-323GY47f2_NjtSN/s320/8.1.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-updated-error-message-galoget.png.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure A. Fail Case Updated, logging in with an unknown user for the system&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The easiest way to avoid the &quot;:&quot; conflict is to use just some part of the error message, so our command will be:&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: left; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;galoget@hackem:~$ hydra hackem http-form-post -m &quot;/hydra/auth.php:uname=^USER^&amp;amp;psw=^PASS^:&lt;b&gt;Cannot find user record&lt;/b&gt;&quot; -L users.txt -P pass.txt -t 10 -w 30 -o hydra-http-post-attack.txt&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdmy_YVvZIX8LeGIFS5vrHisI5Kow0GPEM54x9B5A19YziGms0KLLctkUe2zIfQ1Ff6j60HcmanieePhFeEewLTImkQSmRseJ2RbYJjiogxBsiIIuGmBUE6PDofvcucvAtFJIz8aFSol_L/s1600/8.2.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-part-error-message-logs-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;268&quot; data-original-width=&quot;723&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdmy_YVvZIX8LeGIFS5vrHisI5Kow0GPEM54x9B5A19YziGms0KLLctkUe2zIfQ1Ff6j60HcmanieePhFeEewLTImkQSmRseJ2RbYJjiogxBsiIIuGmBUE6PDofvcucvAtFJIz8aFSol_L/s400/8.2.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-part-error-message-logs-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure B. Executing hydra as in Figure 8, but using a partial error message&lt;/div&gt;
&lt;br /&gt;
Other option could be to escape that character, in that case the command will be:&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: left; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: monospace , monospace; font-size: 15px; white-space: pre-wrap;&quot;&gt;galoget@hackem:~$ &lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: monospace , monospace;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;hydra hackem http-form-post -m &quot;/hydra/auth.php:uname=^USER^&amp;amp;psw=^PASS^:&lt;b&gt;Error\: Cannot find user record&lt;/b&gt;&quot; -L users.txt -P pass.txt -t 10 -w 30 -o hydra-http-post-attack.txt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYa0lJW2TxHRhgFf7Z5Dy9qXt5wuFOqvr6ZM6Ax553ItxaRYwQajVYNFTlQbusRMx_PulJQ6NeqguNkqTbcu_rvpXGgTGcydhYWMZBuX_TWnErUKVJpELc2IpVrZvwOqUng4zHen4M1Ztr/s1600/8.3.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-escaping-logs-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;302&quot; data-original-width=&quot;723&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYa0lJW2TxHRhgFf7Z5Dy9qXt5wuFOqvr6ZM6Ax553ItxaRYwQajVYNFTlQbusRMx_PulJQ6NeqguNkqTbcu_rvpXGgTGcydhYWMZBuX_TWnErUKVJpELc2IpVrZvwOqUng4zHen4M1Ztr/s400/8.3.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-escaping-logs-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure C. Executing hydra as in Figure 8, but escaping the special character, this means using the complete error message in our command.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;As you can see on the figures, it works in both cases, so just use the one that makes you feel more comfortable.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Continuing with the post, in case you were wondering what was the content inside users.txt and pass.txt, here they are:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy5-NnbTcNSbkFbPTdthoGKHb_XeOmkZOJB8uW7xSKjAHXbq6PAsYWIh28J3bc4dUmE5qASX25ZJaWa2RrWoQHR5gypUjrjhktb4_3_zM-OTQLimHlbtp2Z07B0y4bsoy7hQwiHNSjAJzm/s1600/9.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-list-usernames-file-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;241&quot; data-original-width=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy5-NnbTcNSbkFbPTdthoGKHb_XeOmkZOJB8uW7xSKjAHXbq6PAsYWIh28J3bc4dUmE5qASX25ZJaWa2RrWoQHR5gypUjrjhktb4_3_zM-OTQLimHlbtp2Z07B0y4bsoy7hQwiHNSjAJzm/s1600/9.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-list-usernames-file-galoget.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 10. Content of users.txt file&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjicSlAo2Tt_ch0A06iLj6hSSgbjTE1adyU7BICTC_3UupWsap1atJQfHwu45RMbabsK4QvFtDOPOIMfHjpLa1Goq9L6M3vtPp2ZQ5_DvV1UmwIgyDsg0uDjYfxwZ0ioycI4N71mO2xgjXC/s1600/10.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-list-passwords-file-galoget.png.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;241&quot; data-original-width=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjicSlAo2Tt_ch0A06iLj6hSSgbjTE1adyU7BICTC_3UupWsap1atJQfHwu45RMbabsK4QvFtDOPOIMfHjpLa1Goq9L6M3vtPp2ZQ5_DvV1UmwIgyDsg0uDjYfxwZ0ioycI4N71mO2xgjXC/s1600/10.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-list-passwords-file-galoget.png.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 11. Content of pass.txt file&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
If we change the password for the user &lt;i&gt;galoget&lt;/i&gt;&amp;nbsp;to any random string that is not present in our *.txt files, then the output of executing the attack again will be something similar to this.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidnmKxYKFRItLJLUarHqMIb77t-1c0MonYVkrey9eC8s6CFAI2Gq88LRKJ5HuRJ833N7j2kDDwPoa6Y_M95SYXY8MmK03pRubz7rZexQ14FLJ_bQ5VMUh94z5DDiFic8wYdePM6mKim4e2/s1600/11.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-failed-login-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;221&quot; data-original-width=&quot;957&quot; height=&quot;91&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidnmKxYKFRItLJLUarHqMIb77t-1c0MonYVkrey9eC8s6CFAI2Gq88LRKJ5HuRJ833N7j2kDDwPoa6Y_M95SYXY8MmK03pRubz7rZexQ14FLJ_bQ5VMUh94z5DDiFic8wYdePM6mKim4e2/s400/11.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-failed-login-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 12. Hydra attack results with no success (the password was not in the dictionary)&lt;/div&gt;
&lt;br /&gt;
But what happens if you actually find not just one, but many valid logins, then the output will be very similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP0zmNZ8ZCM9h42_SKlIFEeuX3SNKyTxqrIQU5vDoEMVuQ52H2eRY4BWrwFsl2MSK8xrfebMHEa02tAlfoAr7K57u-djtSl3SssFx1TYAMsa7hOyFtW8tVeT8P3L2j27LwvGo6gvaJjKhP/s1600/12.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-success-some-logins-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;260&quot; data-original-width=&quot;957&quot; height=&quot;107&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP0zmNZ8ZCM9h42_SKlIFEeuX3SNKyTxqrIQU5vDoEMVuQ52H2eRY4BWrwFsl2MSK8xrfebMHEa02tAlfoAr7K57u-djtSl3SssFx1TYAMsa7hOyFtW8tVeT8P3L2j27LwvGo6gvaJjKhP/s400/12.hydra-hackem-attack-bruteforce-http-post-form-authentication-php-user-password-success-some-logins-galoget.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 13. Hydra attack results with 2 valid logins&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Brute-forcing with xHydra (GUI/GTK)&lt;/h2&gt;
&lt;div&gt;
Now, we&#39;re going to repeat the same process, but using the graphical user interface (hydra-gtk).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
First, we search for Hydra in our system, it depends on what distribution you&#39;re using, but in the worst case scenario that you can&#39;t find it, open it with a terminal by writing: hydra-gtk&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFFrnw938sRgDkoPsiFq_Ywif5FbiGyqDFetVExIbAkUUVrjlILWwX14ZAN4TroP-oCnx9Hj_1Wd_59_5SemAJwxsTX7M98_DGNfeFKdE7TlQziOjDYiDc6eBr5bFX1zSZl0tEu0SXCbG/s1600/1.opening-hydra-gtk-gui-galoget-hackem.png.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;241&quot; data-original-width=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRFFrnw938sRgDkoPsiFq_Ywif5FbiGyqDFetVExIbAkUUVrjlILWwX14ZAN4TroP-oCnx9Hj_1Wd_59_5SemAJwxsTX7M98_DGNfeFKdE7TlQziOjDYiDc6eBr5bFX1zSZl0tEu0SXCbG/s1600/1.opening-hydra-gtk-gui-galoget-hackem.png.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 14. Searching for Hydra GTK (xHydra) in Ubuntu&lt;/div&gt;
&lt;br /&gt;
After opening the app, we need to fill the same parameters that we used in the CLI version of hydra, in the following picture you can see 2 important details that are required to be filled (Single Target, Protocol):&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9i7CD6YDR26ebNL7FWO-RdsdsRShtPvW5uGmadym003K5LbLWyLWQuja9VGQAQqUwvC9KdwXy-_Zj22_mifFshb3wWYTExMMUxRhQ1Va0d1lQtUb8nuNGYNbxXHr7uFuDjuHtX4NVqa8Q/s1600/2.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9i7CD6YDR26ebNL7FWO-RdsdsRShtPvW5uGmadym003K5LbLWyLWQuja9VGQAQqUwvC9KdwXy-_Zj22_mifFshb3wWYTExMMUxRhQ1Va0d1lQtUb8nuNGYNbxXHr7uFuDjuHtX4NVqa8Q/s320/2.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 15. Target tab parameters for xHydra in Ubuntu&lt;/div&gt;
&lt;br /&gt;
In the second tab, we need to set the routes to the users.txt and pass.txt files and also we can set some options to try more attempts (Try login as password, Try empty password, Try reverse login).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7OdVBZVbp1ti1y5s1meZkIizWUQLZmX2y-hWYCRooNXnoSFP-nbnI0x4EjWHEpaXxTvXEUBeGjjcYVpPoUp2DY1CmlHqG-ETZ-_AAu_sxkspkGmA78qFOW7JNtpRoCCii7dQ-MCxHvOHD/s1600/3.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-usernames-passwords-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7OdVBZVbp1ti1y5s1meZkIizWUQLZmX2y-hWYCRooNXnoSFP-nbnI0x4EjWHEpaXxTvXEUBeGjjcYVpPoUp2DY1CmlHqG-ETZ-_AAu_sxkspkGmA78qFOW7JNtpRoCCii7dQ-MCxHvOHD/s320/3.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-usernames-passwords-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 16. Passwords tab parameters for xHydra in Ubuntu&lt;/div&gt;
&lt;br /&gt;
Then we pass to the Tuning tab, where you can set the number of tasks that you may want to execute in your machine, this depends on the hardware capabilities of your computer. Also we set a timeout in case the website is not responding to our requests. We&#39;re not using a proxy so ignore that part.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKhAbwM_KvZrDCxD7dAv30i__H1uCPEjEfF8wEPNwZKRQOizbI-UaFpFB22GrLKhc5kyBzr3xmR6UwxTBxJYyf2MKqR4mS0d20wixDt02MKFgaaf8fbkMrd39KrKr3VXAsyLnKiUuJniSl/s1600/4.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-tuning-tasks-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKhAbwM_KvZrDCxD7dAv30i__H1uCPEjEfF8wEPNwZKRQOizbI-UaFpFB22GrLKhc5kyBzr3xmR6UwxTBxJYyf2MKqR4mS0d20wixDt02MKFgaaf8fbkMrd39KrKr3VXAsyLnKiUuJniSl/s320/4.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-tuning-tasks-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 17. Tuning tab parameters for xHydra in Ubuntu&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The next tab is called &quot;Specific&quot;, here the only required parameter is the http/https url, please refer to the image below for a better understanding:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSzV7myWdLVk58ymp61gHxn6gSXXVkcLRo-9A7HCuH3BjhRl4yYZF8JTymTcryCNQoB6iAnQh2IsZ46Ihd7ZVujerbo0ockbD3VXEKIZQWe0N6jVKu4D3TZS2J0wQNJsZr0kBF4m1fan0l/s1600/5.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-fail-case-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSzV7myWdLVk58ymp61gHxn6gSXXVkcLRo-9A7HCuH3BjhRl4yYZF8JTymTcryCNQoB6iAnQh2IsZ46Ihd7ZVujerbo0ockbD3VXEKIZQWe0N6jVKu4D3TZS2J0wQNJsZr0kBF4m1fan0l/s320/5.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-fail-case-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 18. Specific tab parameters for xHydra in Ubuntu&lt;/div&gt;
&lt;br /&gt;
We&#39;re all set, now let&#39;s take a look at the &quot;Start&quot; tab, it is empty before we launch our attack.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWU18ZPSCkjTnTl2hVhogclBbeojNaRfIr1lVf7zeb9Drz3ka4yJuxhzuJwXxaCkEiESGM7N2pccHgw986oM9y2eBWbFJ1EyQkw-mpQbTN5AQWXI92uz8IuHsPkEOQdcSXKY0x9uyaIq28/s1600/6.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-ready-to-attack-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWU18ZPSCkjTnTl2hVhogclBbeojNaRfIr1lVf7zeb9Drz3ka4yJuxhzuJwXxaCkEiESGM7N2pccHgw986oM9y2eBWbFJ1EyQkw-mpQbTN5AQWXI92uz8IuHsPkEOQdcSXKY0x9uyaIq28/s320/6.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-ready-to-attack-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 19. Start tab of xHydra in Ubuntu before launching the attack&lt;/div&gt;
&lt;br /&gt;
Finally, after executing our attack, we can see some output, that is the same we got with the CLI utility, the username was &lt;i&gt;galoget &lt;/i&gt;and the password was &lt;i&gt;hackem.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKfsDS2b7d2fmBooWetUZCA4oN_Nm2I3ESYKJvq7oV1rBApPtWoUU8L64OnD9wf_zifVYtNhYz6i1gNSsD2czp5K6HLwOaQU5OzKCXRxYP1lkdz5fNb_Xx6ATRNvCbVE0T3FoSGuhkXu5J/s1600/7.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-attack-success-galoget.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKfsDS2b7d2fmBooWetUZCA4oN_Nm2I3ESYKJvq7oV1rBApPtWoUU8L64OnD9wf_zifVYtNhYz6i1gNSsD2czp5K6HLwOaQU5OzKCXRxYP1lkdz5fNb_Xx6ATRNvCbVE0T3FoSGuhkXu5J/s320/7.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-attack-success-galoget.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 20. Start tab of xHydra in Ubuntu after launching the attack, 1 valid login found&lt;/div&gt;
&lt;br /&gt;
If you want to compare the command that we had in the CLI utility with the one generated in our GUI utility, please see the image below, at the end of the app is the command that you&#39;re searching for.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAi04jmM5rRhYyXFtAbm4K6O8OFZ1V7M4buiGLeZ-qFUlpNu0ZwHMNIU3i6fTEMy7X2JdWi3Z4WAYR0NeM1bMJGVpa7kIz0BE-_38aPxU4tx4yZwfKqcvGSpzrI8aUreZs_HSwTkU72iJC/s1600/8.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-attack-success-galoget-zoom.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;1145&quot; height=&quot;143&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAi04jmM5rRhYyXFtAbm4K6O8OFZ1V7M4buiGLeZ-qFUlpNu0ZwHMNIU3i6fTEMy7X2JdWi3Z4WAYR0NeM1bMJGVpa7kIz0BE-_38aPxU4tx4yZwfKqcvGSpzrI8aUreZs_HSwTkU72iJC/s320/8.hydra-gtk-gui-hackem-host-target-attack-bruteforce-http-post-form-authentication-path-auth-usernames-passwords-attack-success-galoget-zoom.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 21. Start tab expanded of xHydra after the attack, 1 valid login found&lt;/div&gt;
&lt;br /&gt;
As you can see in this demo, the time required to bruteforce a login form is pretty small, that&#39;s why it is recommended to have &lt;b&gt;strong&lt;/b&gt;&amp;nbsp;and &lt;b&gt;unique &lt;/b&gt;passwords, with words/phrases that are difficult to find on dictionaries online.&lt;br /&gt;
&lt;br /&gt;
Hope you liked this post, if you have any recommendation or if you find a mistake, please leave a comment.&lt;br /&gt;
&lt;br /&gt;
Happy Password Cracking!!&amp;nbsp; :D&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/3686145164564385845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2018/01/cracking-passwords-brute-force-thc-hydra-xhydra-gtk.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3686145164564385845'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3686145164564385845'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2018/01/cracking-passwords-brute-force-thc-hydra-xhydra-gtk.html' title='Cracking Passwords: Brute-force Attack with Hydra (CLI) + xHydra (GTK)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIsj81a4LIAWFYQW9HY_bEilk7OwtNAX2IchCc3AMjiuFQhSaSr4whQ2Kqk5Qnkrw2XQQMNxkKKcXwkSDQ1CFdSc521ksb3JqdWusv6uKuLsjYKrLTeKNwq28qt90UMivhtyXI2_EsHdc_/s72-c/hydra-bruteforce.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-1308122258956692220</id><published>2017-12-04T03:04:00.000-05:00</published><updated>2017-12-08T06:03:59.316-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="base64"/><category scheme="http://www.blogger.com/atom/ns#" term="broken access control"/><category scheme="http://www.blogger.com/atom/ns#" term="cookies"/><category scheme="http://www.blogger.com/atom/ns#" term="crypto"/><category scheme="http://www.blogger.com/atom/ns#" term="cryptography"/><category scheme="http://www.blogger.com/atom/ns#" term="ctf"/><category scheme="http://www.blogger.com/atom/ns#" term="ctf365"/><category scheme="http://www.blogger.com/atom/ns#" term="encoding"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="hex"/><category scheme="http://www.blogger.com/atom/ns#" term="injection"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp top 10"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="session management"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sqli"/><category scheme="http://www.blogger.com/atom/ns#" term="stegano"/><category scheme="http://www.blogger.com/atom/ns#" term="steganography"/><category scheme="http://www.blogger.com/atom/ns#" term="writeup"/><title type='text'>Blitz CTF 001 Writeup (Step by Step Solutions) [CTF365]</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ckBpUIuaxxTl8q1rL6zxVGVUr3OOHz2_fIJtOmeZ9RnIf1p4t752D41E2Qamv0IxfNr022VNktiZoxVSV3Ap6i4am3OYZWhWKE4jvbViP2Zafj7fmOvXv96B-9-rwCx29j84uhhiaHP1/s640/Blitz+CTF+001.png&quot; width=&quot;600&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A few days ago, we received an invitation to the BlitzCTF001, a very short and fast cybersecurity CTF. The challenges contained in this CTF covers: Crypto (Encoding), SQLi, Broken Access Control, Session Manipulation and Steganography.&lt;br /&gt;
&lt;br /&gt;
In our opinion, the challenges are interesting and entertaining, especially to learn about web application security, so we decided to share the solutions (just in case that you got stuck in some level), hope you like and enjoy them as we did.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
Level 01&lt;/h2&gt;
After signing in into your personal account, the first screen shown looks like a standard GNU/Linux shell. After trying some basic commands we can see that there are 2 files: &lt;code class=&quot;markup--code markup--p-code&quot;&gt;README&lt;/code&gt; and &lt;code class=&quot;markup--code markup--p-code&quot;&gt;challenge1.txt&lt;/code&gt;, in the figure below we can see the content of both files.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK7pUK-T2iWnu3ApkE1ESFSrf9ViPhkWCdWziWw-E4FxIO6hazzcw-q9tOdvqo9SR75Y9gtgWdng97wOSOalvJb1ASaFLzWaHahuAZh4u_3MNntNHZw0Q3Zv4G1f1Y_DuI_4zNKBDSuSC4/s1600/Blitz+CTF+001+-+Shell+and+Files+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK7pUK-T2iWnu3ApkE1ESFSrf9ViPhkWCdWziWw-E4FxIO6hazzcw-q9tOdvqo9SR75Y9gtgWdng97wOSOalvJb1ASaFLzWaHahuAZh4u_3MNntNHZw0Q3Zv4G1f1Y_DuI_4zNKBDSuSC4/s400/Blitz+CTF+001+-+Shell+and+Files+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Figure 1. Content of &quot;README&quot; and &quot;challenge1.txt&quot; files&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The content of the file&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;challenge1.txt&lt;/span&gt;&amp;nbsp;looks like and hex-encoded string, but before trying to decode it, we proceed to check the source code of the &quot;shell&quot; to look for any hints. At this point we realize that it&#39;s nothing close to a shell, because it has the print statements for each command, and there are only 17 cases for the commands available.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeX0bBsUlLmxsC-8ccGf5d80jUERhGiO1M13_zivhg9JwTxg2l7Z6M8LZB1i0oDszmeJSrc-WYKHbsfNiy5W3JDT8DuMJ8x3U3ImgnBdt371zEcWQjEtrVs0oHkqV6h7UGAsC_p0bWpqNY/s1600/Blitz+CTF+001+-+%255B1%255D+Source+Code+of+the+Shell.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeX0bBsUlLmxsC-8ccGf5d80jUERhGiO1M13_zivhg9JwTxg2l7Z6M8LZB1i0oDszmeJSrc-WYKHbsfNiy5W3JDT8DuMJ8x3U3ImgnBdt371zEcWQjEtrVs0oHkqV6h7UGAsC_p0bWpqNY/s400/Blitz+CTF+001+-+%255B1%255D+Source+Code+of+the+Shell.png&quot; width=&quot;247&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 2. Source code of the &quot;Shell&quot;, here we can see the print statements for each command&lt;/div&gt;
&lt;br /&gt;
After checking this, we can assume that this &quot;shell&quot; can&#39;t accept our flag because of its obvious limitations, so it has to be another URL that may be encoded on the the hex-encoded string, so let&#39;s try to convert it to normal text.&lt;br /&gt;
&lt;br /&gt;
Initial hex-encoded string:&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;3364203435203664203561203638203465203534203464203330203535203537203561203737203539203537203466203638203331203639203539203739203431203434203466203734203633203534203561203738203435203534203463203331203535203664203539203662203331203433203464203739203539203434203464203332203435203664203464203330203338203433203634203663203461203333203539203663203465203333203463203734203339203332203539203735203535203661203465203761203539203437203634203661203335203639203635203330203663203437203632203639203339203739203463203336203431203438203634203330203638203437203439203736203532203438203439203736203634203435203439203638203464203438203634203638203461203333203561203735203339203332203531&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We are going to use&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;xxd&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;echo&lt;/span&gt;&amp;nbsp;with a pipe in a bash shell to get the result:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy9vVqyd1Uk9lezq9gKTFd_MbtYyoY3EgesBapJFugnmDMgGpv3zTGT9ZZkRLUMv3HkdPsxm9XmAZc-sj-PVWXChHdKiDCUSIZufHpkloo9o5BtUZWaO9zd6WBWzESEp05mEDZt9mpPp5f/s1600/Blitz+CTF+001+%255B1%255D+-+Hex+Decoding+Round+1+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy9vVqyd1Uk9lezq9gKTFd_MbtYyoY3EgesBapJFugnmDMgGpv3zTGT9ZZkRLUMv3HkdPsxm9XmAZc-sj-PVWXChHdKiDCUSIZufHpkloo9o5BtUZWaO9zd6WBWzESEp05mEDZt9mpPp5f/s400/Blitz+CTF+001+%255B1%255D+-+Hex+Decoding+Round+1+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 3. Decoding the initial hex-encoded string&lt;/div&gt;
&lt;br /&gt;
The result of decoding the hex-encoded string is another hex-encoded string, so we repeat the same process again:&lt;br /&gt;
&lt;br /&gt;
The result (another hex-encoded string):&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;3d456d5a684e544d3055575a7759574f683169597941444f7463545a7845544c31556d596b31434d7959444d32456d4d303843646c4a33596c4e334c7439325975556a4e7a5947646a356965306c47626939794c36414864306847497652484976644549684d4864684a335a75393251&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2l-WRSbcX8c1aKSyET8s8ZHajRwth8kQ3ZX0doLGUjCLKdy15Ujm_NezdEGzuLQdPmd__IXvsUCdgLuvShng9N-75eSMZ5bAIKKX7VOBGQnxZp6lnNlbnGmAPZxo2f8S8cQqhFumrIjfZ/s1600/Blitz+CTF+001+%255B1%255D+-+Hex+Decoding+Round+2+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2l-WRSbcX8c1aKSyET8s8ZHajRwth8kQ3ZX0doLGUjCLKdy15Ujm_NezdEGzuLQdPmd__IXvsUCdgLuvShng9N-75eSMZ5bAIKKX7VOBGQnxZp6lnNlbnGmAPZxo2f8S8cQqhFumrIjfZ/s400/Blitz+CTF+001+%255B1%255D+-+Hex+Decoding+Round+2+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 4. Decoding the 2nd hex-encoded string&lt;/div&gt;
&lt;br /&gt;
Now, we get something similar to a Base 64 encoded string, but if we try to decode it right now, we are going to get an invalid result, because it&#39;s reversed, so let&#39;s flip it around. For these part of the solution, we are going to use python (reversing and decoding the string), for decoding it, we&#39;ll use the &lt;i&gt;base64 &lt;/i&gt;module.&lt;br /&gt;
&lt;br /&gt;
The string that appears to be a Base64 encoded string:&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;=EmZhNTM0UWZwYWOh1iYyADOtcTZxETL1UmYk1CMyYDM2EmM08CdlJ3YlN3Lt92YuUjNzYGdj5ie0lGbi9yL6AHd0hGIvRHIvdEIhMHdhJ3Zu92Q&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_T2RHe9n3BYiz6QluK9lRx1vWPX33T9tmOLDU1wqZLXOxkaF0P6nv_bNunS-68xIxtvlb1QAzQWqbrFXXcfFfYEeLYlSGQ2yXXMSOjIYpM0yYkyZA4wW2AfWWfEeqVzhxrEyLAuPugCTT/s1600/Blitz+CTF+001+-+%255B1%255D+Base64+Decoding+with+Python+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;167&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_T2RHe9n3BYiz6QluK9lRx1vWPX33T9tmOLDU1wqZLXOxkaF0P6nv_bNunS-68xIxtvlb1QAzQWqbrFXXcfFfYEeLYlSGQ2yXXMSOjIYpM0yYkyZA4wW2AfWWfEeqVzhxrEyLAuPugCTT/s400/Blitz+CTF+001+-+%255B1%255D+Base64+Decoding+with+Python+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 5. Reversing the last string and decoding it&lt;/div&gt;
&lt;br /&gt;
Finally!, we got the Flag, It&#39;s a secret URL, let&#39;s open it to confirm our success:&lt;br /&gt;
&lt;a href=&quot;http://blitz.ctf365.com/secret/42a60620-dbe5-11e7-802b-a9f0ee413afa&quot;&gt;http://blitz.ctf365.com/secret/42a60620-dbe5-11e7-802b-a9f0ee413afa&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv-BDL_WBl23ZPaCim0EACaz420L1GeT6ix2Hy3tl-suj3u_qV01z9tscbKgYOAG2zqbWMVWnjj6ohAwAYpw4yuehSvgPSYMF66pkZYnFXwQt9IivBJEqqsrlSPAyr4Jo4HYjtlLR3fY90/s1600/Blitz+CTF+001+-+%255B1%255D+Success+Level+01+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv-BDL_WBl23ZPaCim0EACaz420L1GeT6ix2Hy3tl-suj3u_qV01z9tscbKgYOAG2zqbWMVWnjj6ohAwAYpw4yuehSvgPSYMF66pkZYnFXwQt9IivBJEqqsrlSPAyr4Jo4HYjtlLR3fY90/s400/Blitz+CTF+001+-+%255B1%255D+Success+Level+01+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 6. Success on Level 01&lt;/div&gt;
&lt;br /&gt;
Yaaay!, now let&#39;s continue, by pressing the &quot;next challenge &amp;gt;&quot; button.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
Level 02&lt;/h2&gt;
The 2nd level receives us with a &lt;i&gt;Login Form&lt;/i&gt;, after checking the source code we found nothing, so let&#39;s to try one of the most common vulnerabilities in web apps (from OWASP TOP 10): SQL Injection.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzTDkWiCoXDbkIna4ydyZyZpXrzrux1nkVtKu3tUTNFUv3kWdTxFW1TX-R-iiC0W871sQtRLXeXVeYIRHx5Hndj9i5bu-T1toJoayTDXRSNJtuu_AZMCBq9VrmNy4KgprXzOyucjnRJzHr/s1600/Blitz+CTF+001+-+%255B2%255D+Level+02+Login+Page+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzTDkWiCoXDbkIna4ydyZyZpXrzrux1nkVtKu3tUTNFUv3kWdTxFW1TX-R-iiC0W871sQtRLXeXVeYIRHx5Hndj9i5bu-T1toJoayTDXRSNJtuu_AZMCBq9VrmNy4KgprXzOyucjnRJzHr/s400/Blitz+CTF+001+-+%255B2%255D+Level+02+Login+Page+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 7. Login form for the 2nd level, let&#39;s try SQLi attacks&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilFabXHt9pGE1PLqo9xOdsCxSda0naKG9kjC56vsB9VPT8qOKBlcTetOvfp4TS7x9k8H3un2-HOKNGAHbsypOsusrYDCV4LGlqyVid8zBgPm4g8ic-R39mNkqpM7TRHc7qESS2JEVmGl6W/s1600/Blitz+CTF+001+-+%255B2%255D+Source+code+of+Level+02+Login+Page+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilFabXHt9pGE1PLqo9xOdsCxSda0naKG9kjC56vsB9VPT8qOKBlcTetOvfp4TS7x9k8H3un2-HOKNGAHbsypOsusrYDCV4LGlqyVid8zBgPm4g8ic-R39mNkqpM7TRHc7qESS2JEVmGl6W/s400/Blitz+CTF+001+-+%255B2%255D+Source+code+of+Level+02+Login+Page+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 8. Source code of Level 02 login page&lt;/div&gt;
&lt;br /&gt;
After some attempts with various combinatios we bypassed the login form, just have to set both, the username and the password to an expression that always evaluate to true like&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;&quot; OR 1=1#&lt;/span&gt;&amp;nbsp;and we&#39;re done with this level.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkg6CDI_ke1Qj2ZdhrUgelQXYJkuBxk2iNirVvTTd-LMeQ4LjgwYeZjqdKzHLX1iiWePFRpP78LFFnCUTC5q-51Y8U8wxNwk1hWOUxY6IVA0k9s1jlDUhQACDGKSBP7JETkJj_23jQB29w/s1600/Blitz+CTF+001+-+%255B2%255D+SQL+Injection+Success+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkg6CDI_ke1Qj2ZdhrUgelQXYJkuBxk2iNirVvTTd-LMeQ4LjgwYeZjqdKzHLX1iiWePFRpP78LFFnCUTC5q-51Y8U8wxNwk1hWOUxY6IVA0k9s1jlDUhQACDGKSBP7JETkJj_23jQB29w/s400/Blitz+CTF+001+-+%255B2%255D+SQL+Injection+Success+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 9. Correct combination for bypassing the Login form&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzutRsusG467D7yMrYl7aZG6OX1lNIQzmsojXuwvJM4JpFFnBeL2IvQmMKFwhfmoEm0T0VockLWgEaQ3Dve5a7Kp31uX9i5b3o4kfKgO9eSYi11W3SEUveM5L3JV2IRatHIsoe9uY3zzIV/s1600/Blitz+CTF+001+-+%255B2%255D+SQL+Injection+Success+Confirmation+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzutRsusG467D7yMrYl7aZG6OX1lNIQzmsojXuwvJM4JpFFnBeL2IvQmMKFwhfmoEm0T0VockLWgEaQ3Dve5a7Kp31uX9i5b3o4kfKgO9eSYi11W3SEUveM5L3JV2IRatHIsoe9uY3zzIV/s400/Blitz+CTF+001+-+%255B2%255D+SQL+Injection+Success+Confirmation+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 10.&amp;nbsp;&lt;span style=&quot;text-align: center;&quot;&gt;Success on Level 02&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Level 03&lt;/h2&gt;
The 3rd level receives us with a message that says: &lt;i&gt;&quot;You’re not authorized to access this page. Are you an admin?&quot;&lt;/i&gt;, there is no login form to fill, so we can assume that this level is related with &lt;i&gt;Cookie Manipulation&lt;/i&gt;, let&#39;s have a look at our cookies.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7_mOoX6FHi9ypgt13-xQVFNToROZkaRt6yC7IB8aJ8XBQZfo4xm9iOqLV8hbsflEmv2nH7z_WxJkzBs9VlA7a79LD_veX96tFkqV7sJt_AXBwf4jIAyMCCKKiHDITeCbPeW105k1XqRYn/s1600/Blitz+CTF+001+-+%255B3%255D+Checking+our+Cookie+values+Level+03+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7_mOoX6FHi9ypgt13-xQVFNToROZkaRt6yC7IB8aJ8XBQZfo4xm9iOqLV8hbsflEmv2nH7z_WxJkzBs9VlA7a79LD_veX96tFkqV7sJt_AXBwf4jIAyMCCKKiHDITeCbPeW105k1XqRYn/s400/Blitz+CTF+001+-+%255B3%255D+Checking+our+Cookie+values+Level+03+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 11. Checking the Cookies and its values&lt;/div&gt;
&lt;br /&gt;
As we can see, the value for the&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;userRole&amp;nbsp;&lt;/span&gt;is just &lt;i&gt;&quot;user&quot;&lt;/i&gt;, so let&#39;s change it to &lt;i&gt;&quot;admin&quot;&lt;/i&gt; in order to become Administrators, and then, refresh the page!!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJiZUVea_KhB5nHFSPjFT-CigeQIg7BipcIKbxUdUqH12ZfwqQnR9HqSouaRYLcs70ItsjFhKuRkdfr80a5EDveZAbNOveYgXCw41lM5V39jLknC9F8pDHnTPP-x-vLT5UqMqcfGAcnJh1/s1600/Blitz+CTF+001+-+%255B3%255D+Cookie+Manipulation+Success+on+Level+03+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJiZUVea_KhB5nHFSPjFT-CigeQIg7BipcIKbxUdUqH12ZfwqQnR9HqSouaRYLcs70ItsjFhKuRkdfr80a5EDveZAbNOveYgXCw41lM5V39jLknC9F8pDHnTPP-x-vLT5UqMqcfGAcnJh1/s400/Blitz+CTF+001+-+%255B3%255D+Cookie+Manipulation+Success+on+Level+03+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 12. Success on Level 03&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Level 04&lt;/h2&gt;
The 4th and last level starts with a form where you&#39;re supposed to enter the flag, there are some messages but they are not related with the solution, so let&#39;s check the source code.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7V6sH8v1Xx5VeCGaIA3PpoSELNG_JKSROSM8GpWjjuJdxd3h8utiZ5-wIkr-O-svbBhySV_azaasN7e_M-zv9h-g2STbQWfMadgaxCA5HmGXvdyL2FmqpqXcAdsbZrKnpwOESJgz1JgXY/s1600/Blitz+CTF+001+-+%255B4%255D+Never+gonna+give+you+a+flag%252C+Never+gonna+let+you+down%252C+Never+gonna+look+around+and+desert+you+-+Level+04+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7V6sH8v1Xx5VeCGaIA3PpoSELNG_JKSROSM8GpWjjuJdxd3h8utiZ5-wIkr-O-svbBhySV_azaasN7e_M-zv9h-g2STbQWfMadgaxCA5HmGXvdyL2FmqpqXcAdsbZrKnpwOESJgz1JgXY/s400/Blitz+CTF+001+-+%255B4%255D+Never+gonna+give+you+a+flag%252C+Never+gonna+let+you+down%252C+Never+gonna+look+around+and+desert+you+-+Level+04+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 13. The welcome page for the Level 04&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRUoZ31h1DkAMcUb1IH2-LikbMarbpVMk5iLRzLZSUy-ND6Xg6gfl0wiBMaK_F7b_qi1r1J6IsowgHf2bMmpcbXg_1nufIsjwcyv1aMY1F6uq96rI7TDtmokhLYiBrNOlhxY5XYCzZI9YT/s1600/Blitz+CTF+001+-+%255B4%255D+Source+code+of+Level+04+initial+page+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRUoZ31h1DkAMcUb1IH2-LikbMarbpVMk5iLRzLZSUy-ND6Xg6gfl0wiBMaK_F7b_qi1r1J6IsowgHf2bMmpcbXg_1nufIsjwcyv1aMY1F6uq96rI7TDtmokhLYiBrNOlhxY5XYCzZI9YT/s400/Blitz+CTF+001+-+%255B4%255D+Source+code+of+Level+04+initial+page+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 14. Source code of Level 04 main page&lt;/div&gt;
&lt;br /&gt;
We found nothing in here, but wait, there is a strange message that says: &lt;i&gt;&quot;Nothing here. Check in the back&quot;&lt;/i&gt;, what is &quot;the back&quot; exactly?, maybe is referring to the background image, we realized that it is a really heavy image on Level 02, but at that moment we didn&#39;t pay attention to it, so maybe it is related with this level, let&#39;s have a look at the CSS code.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixTDCcN50EcoCn_8cwA2a-_xpfTvnWbqQs6InP6y7xc_xC-_lOedGroeiYJ0oVZun3xyLdomODPJhue-JKviecjH-jmtMZZ9j1JcTjH1fJdb-mnMbn4Hv3ZTHV22WrjFQDuNZt7eJS9NZI/s1600/Blitz+CTF+001+-+%255B4%255D+Checking+CSS+on+Level+04+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixTDCcN50EcoCn_8cwA2a-_xpfTvnWbqQs6InP6y7xc_xC-_lOedGroeiYJ0oVZun3xyLdomODPJhue-JKviecjH-jmtMZZ9j1JcTjH1fJdb-mnMbn4Hv3ZTHV22WrjFQDuNZt7eJS9NZI/s400/Blitz+CTF+001+-+%255B4%255D+Checking+CSS+on+Level+04+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 15. The image to be downloaded is highlighted in the CSS code&lt;/div&gt;
&lt;br /&gt;
Now, we proceed to download the image using&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;wget&lt;/span&gt;, at this moment we can see the actual size of the image (1,3MB), pretty big for just a simple background, so we are going to check if the file has embedded hidden strings inside of it, this can be done with the&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;string&amp;nbsp;&lt;/span&gt;command.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTCugJdMW_HBIDDR1FqkNbUm0dmCzi07iOaV1eqQL8XeyG9ZcGTDQ8T5XEhHIMuLx1W5gXfuVQiNUCUQkB8Hi6AvbR0B55okwEn2oq2BRHZeeT3OvN05AsmwPww1YphK-LZHyh_YYEbqJ/s1600/Blitz+CTF+001+-+%255B4%255D+Downloading+the+Background+Image+-+Level+04+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTCugJdMW_HBIDDR1FqkNbUm0dmCzi07iOaV1eqQL8XeyG9ZcGTDQ8T5XEhHIMuLx1W5gXfuVQiNUCUQkB8Hi6AvbR0B55okwEn2oq2BRHZeeT3OvN05AsmwPww1YphK-LZHyh_YYEbqJ/s400/Blitz+CTF+001+-+%255B4%255D+Downloading+the+Background+Image+-+Level+04+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 16. Downloading the image with wget and checking its size&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_ghXO4TX3zmAxTVQwkD5ciefdMoOrSKJtKI5PWpAO6-SvKunB8qpzNO5t-Kj7_LfBcUuRKky7HeOYZ98MBXrNWgZD13NcHKrJAVoISsYlF_F8MYhaSNCMfQljkQYqwdAr_Tc3LiOLziXW/s1600/Blitz+CTF+001+-+%255B4%255D+Getting+hidden+strings+on+the+background+image+-+Steganography+on+Level+04+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_ghXO4TX3zmAxTVQwkD5ciefdMoOrSKJtKI5PWpAO6-SvKunB8qpzNO5t-Kj7_LfBcUuRKky7HeOYZ98MBXrNWgZD13NcHKrJAVoISsYlF_F8MYhaSNCMfQljkQYqwdAr_Tc3LiOLziXW/s400/Blitz+CTF+001+-+%255B4%255D+Getting+hidden+strings+on+the+background+image+-+Steganography+on+Level+04+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Figure 17. Getting hidden strings on the background image with the string command (Steganography)&lt;/div&gt;
&lt;br /&gt;
All we have to do, is copy that flag and put it in the main page of the Level 04.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwP1pMZoiXqjHKJ2LOqcN-L_H3L6VKoElhzfhmWKjLIBe6p90i5iIvkJ_pS9QNJBeOn_Aba9Zubat9VAyseLIZBiVn9uzk68xClv90pMsH4WLFtyIITqrrv5P8BbhS91QGQAleEw8gGmiN/s1600/Blitz+CTF+001+-+%255B4%255D+Inserting+the+Flag+on+Level+04+Page+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwP1pMZoiXqjHKJ2LOqcN-L_H3L6VKoElhzfhmWKjLIBe6p90i5iIvkJ_pS9QNJBeOn_Aba9Zubat9VAyseLIZBiVn9uzk68xClv90pMsH4WLFtyIITqrrv5P8BbhS91QGQAleEw8gGmiN/s400/Blitz+CTF+001+-+%255B4%255D+Inserting+the+Flag+on+Level+04+Page+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 18. Entering the flag into the Level 04 main page&lt;/div&gt;
&lt;br /&gt;
And, as we can see, it was correct, we have finished the Blitz CTF 001 [CTF365]!! =D&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdCod0-asNqC2GC2R2oNdB3wIDf3Vx0ozDimrJdJs1d7xzTmzXaCGoUc0DLDIeg6SCyOIS4n7G_vOjKoYqZqMyy1_eM5CYxcXhT2s_Z052ebNOs5w3j9g6R8veWuIcUW7t7nC4X3_DtYuG/s1600/Blitz+CTF+001+-+%255B4%255D+Congratulations%2521+You%2527have+completed+the+Blitz+CTF%2521+Well+Done%2521+Share+your+Success%2521+-+Level+04+%255BHackem%255D.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdCod0-asNqC2GC2R2oNdB3wIDf3Vx0ozDimrJdJs1d7xzTmzXaCGoUc0DLDIeg6SCyOIS4n7G_vOjKoYqZqMyy1_eM5CYxcXhT2s_Z052ebNOs5w3j9g6R8veWuIcUW7t7nC4X3_DtYuG/s400/Blitz+CTF+001+-+%255B4%255D+Congratulations%2521+You%2527have+completed+the+Blitz+CTF%2521+Well+Done%2521+Share+your+Success%2521+-+Level+04+%255BHackem%255D.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 19. Success on Level 04&lt;/div&gt;
&lt;br /&gt;
This was a nice CTF, we really have fun solving it, just it was a bit short, also it is important to consider that the instructions were a pretty great hidden clue in their own way. Because they listed the types of challenges and it matches with the order of the levels almost perfectly.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
A collection of easy challenges that covers:&lt;br /&gt;
1. Crypto,&lt;br /&gt;
2. SQLi,&lt;br /&gt;
3. Broken Access&amp;nbsp; Control,&lt;br /&gt;
4. Cookie Manipulation and&lt;br /&gt;
5. Stegano.&lt;/blockquote&gt;
Thanks to the organizers of this game, hope there will be a next release of Blitz CTF soon.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/1308122258956692220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2017/12/blitz-ctf-001-writeup-step-by-step-ctf365.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/1308122258956692220'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/1308122258956692220'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2017/12/blitz-ctf-001-writeup-step-by-step-ctf365.html' title='Blitz CTF 001 Writeup (Step by Step Solutions) [CTF365]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1ckBpUIuaxxTl8q1rL6zxVGVUr3OOHz2_fIJtOmeZ9RnIf1p4t752D41E2Qamv0IxfNr022VNktiZoxVSV3Ap6i4am3OYZWhWKE4jvbViP2Zafj7fmOvXv96B-9-rwCx29j84uhhiaHP1/s72-c/Blitz+CTF+001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-7949015999343105209</id><published>2014-01-03T22:38:00.000-05:00</published><updated>2017-01-05T22:39:36.271-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cli"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="management"/><category scheme="http://www.blogger.com/atom/ns#" term="password"/><category scheme="http://www.blogger.com/atom/ns#" term="terminal"/><title type='text'>Password Management in GNU/Linux by using passwd command</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrkvzCWcf4hJDvJ2qK7f7IGjAQm2xBnrAFoFhR9NpISDdmA8pNcLK8avhYju6hJFI4MJEYOzpd1cJv43Y8f99gOGMisXNcSc5dF6TDQv1snTFJI53lKZ6vsPjn7mR6rOWlW7bm2Pe7C8uW/s1600/password-696x464.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrkvzCWcf4hJDvJ2qK7f7IGjAQm2xBnrAFoFhR9NpISDdmA8pNcLK8avhYju6hJFI4MJEYOzpd1cJv43Y8f99gOGMisXNcSc5dF6TDQv1snTFJI53lKZ6vsPjn7mR6rOWlW7bm2Pe7C8uW/s400/password-696x464.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;A password (commonly knows as&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; text-align: justify;&quot;&gt;passwd&lt;/b&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;in linux) is an unspaced sequence of characters used to determine that a computer user requesting access to a computer system is really that particular user. Typically, users of a multiuser or securely protected single-user system claim a unique name (called a user ID) that can be generally known. In order to verify that someone entering that user ID really is that person, a second identification, the password, known only to that person and to the system itself, is entered by the user. Most networks require that end users change their passwords on a periodic basis.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;color: #1e73be; font-size: x-large;&quot;&gt;passwd command&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;
The &lt;b&gt;passwd &lt;/b&gt;command is used to create and change the password of a user account. A normal user can run &lt;b&gt;passwd&amp;nbsp;&lt;/b&gt;to change their own password, and a system administrator (the superuser ROOT) can use &lt;b&gt;passwd&amp;nbsp;&lt;/b&gt;to change another user’s password, or define how that account’s password can be used or changed.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;color: #1e73be; font-size: x-large;&quot;&gt;PASSWD SYNTAX&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #222222;&quot;&gt;passwd [&lt;/span&gt;&lt;i style=&quot;box-sizing: border-box; color: #222222;&quot;&gt;OPTION&lt;/i&gt;&lt;span style=&quot;color: #222222;&quot;&gt;] [&lt;/span&gt;&lt;i style=&quot;box-sizing: border-box; color: #222222;&quot;&gt;USER&lt;/i&gt;&lt;span style=&quot;color: #222222;&quot;&gt;]
&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #3d85c6;&quot;&gt;Usage: passwd [OPTION...] &amp;lt;accountName&amp;gt;
-k, --keep-tokens keep non-expired authentication tokens
-d, --delete delete the password for the named account (root only)
-l, --lock lock the named account (root only)
-u, --unlock unlock the named account (root only)
-f, --force force operation
-x, --maximum=DAYS maximum password lifetime (root only)
-n, --minimum=DAYS minimum password lifetime (root only)
-w, --warning=DAYS number of days warning users receives before password expiration
 (root only)
-i, --inactive=DAYS number of days after password expiration when an account becomes 
disabled (root only)
-S, --status report password status on the named account (root only)
--stdin read new tokens from stdin (root only)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #1e73be; font-size: 27px; line-height: 38px; margin: 30px 0px 20px; text-align: justify;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Change the password for Normal user&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;When you logged in as non-root user like user1 in my case and run passwd command then it will reset password of logged in user.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; color: #222222; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[user1@localhost ~]$ passwd
Changing password for user user1.
Changing password for user1.
(current) UNIX password:
New password:
Retype new password:
passwd: 
all authentication tokens updated successfully.&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;When you logged in as root user and run &lt;b&gt;passwd&lt;/b&gt; command then it will reset the root password by default and if you specify the user-name after passwd command then it will change the password of that particular user.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #1e73be; font-family: inherit; font-size: 27px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #1e73be; font-family: inherit; font-size: 27px;&quot;&gt;Display Password Status Information&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-size: 15px; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To display password status information of a user , use&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;-S&lt;/strong&gt;&amp;nbsp;option in passwd command.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -S user1
user1 PS 2016-04-21 0 99999 7 -1 (Password set, SHA512 crypt.)&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-size: 15px; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In the above output first field shows the user name and second field shows Password status (&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;PS&lt;/strong&gt;&amp;nbsp;=&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Password Set&lt;/strong&gt;&amp;nbsp;,&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;LK&lt;/strong&gt;&amp;nbsp;=&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Password locked&lt;/strong&gt;&amp;nbsp;,&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;NP&lt;/strong&gt;&amp;nbsp;=&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;No Password&lt;/strong&gt;&amp;nbsp;), third field shows when the password was changed and last &amp;amp; fourth field shows minimum age, maximum age, warning period, and inactivity period for the password.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;We can display password status information for all users at a time by using the option –&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; font-family: inherit;&quot;&gt;Sa&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;root@localhost:~# passwd -Sa
&lt;/pre&gt;
&lt;div style=&quot;font-size: 15px;&quot;&gt;
&lt;span style=&quot;color: #1e73be; font-family: inherit; font-size: 27px;&quot;&gt;Removing Password of a User&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 15px;&quot;&gt;
We can remove the password for particular user by using option -d&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-size: 15px; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -d user1
Removing password for user user1.
passwd: Success
[root@localhost ~]#&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 29px; margin: 24px 0px 14px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 27px;&quot;&gt;&lt;span style=&quot;color: #1e73be;&quot;&gt;Lock the password of System User&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Use ‘&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;-l&lt;/strong&gt;‘ option in passwd command to lock a user’s password, it will add “&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;!&lt;/strong&gt;” at starting of user’s password. A User can’t Change it’s password when his/her password is locked.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -l user1
Locking password for user user1.
passwd: Success&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 29px; margin-bottom: 14px; margin-top: 24px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 27px;&quot;&gt;&lt;span style=&quot;color: #1e73be;&quot;&gt;Unlock User’s Password using -u option&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;use&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;-u&lt;/strong&gt;&amp;nbsp;option to unlock the user accounts locked by&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;passwd -l&lt;/strong&gt;&amp;nbsp;option&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -u user1
Unlocking password for user user1.
passwd: Success&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 29px; margin-bottom: 14px; margin-top: 24px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 27px;&quot;&gt;&lt;span style=&quot;color: #1e73be;&quot;&gt;Setting inactive days using -i option&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;use&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;-i&lt;/strong&gt;&amp;nbsp;option along with&amp;nbsp; passwd command to set inactive days for a system user. This will come into the picture when password of user&amp;nbsp; expired and user didn’t change its password in ‘&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;n&lt;/strong&gt;‘ number of days ( i.e 7 days in my case)&amp;nbsp; then after that user will not able to login.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -i 7 user1
Adjusting aging data for user user1.
passwd: Success
[root@localhost ~]# passwd -S user1
user1 PS 2016-04-21 0 99999 7 7 (Password set, SHA512 crypt.)
[root@localhost ~]#&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 29px; margin-bottom: 14px; margin-top: 24px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #1e73be;&quot;&gt;&lt;span style=&quot;font-size: 27px;&quot;&gt;Setting Minimum No.of Days to Change Password using passwd -n option&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Using the option&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;-n&lt;/strong&gt;&amp;nbsp;along with&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;passwd&lt;/strong&gt;&amp;nbsp;command we can set the minimum number of days to change the password. A value of zero shows that user can change it’s password in any time.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -n 90 user1
Adjusting aging data for user user1.
passwd: Success
[root@localhost ~]# passwd -S user1
user1 PS 2016-04-21 90 99999 7 7 (Password set, SHA512 crypt.)
[root@localhost ~]#&lt;/pre&gt;
&lt;/div&gt;
&lt;h4 style=&quot;background-color: white; box-sizing: border-box; line-height: 29px; margin: 24px 0px 14px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: medium;&quot;&gt;&lt;span style=&quot;color: #1e73be;&quot;&gt;&lt;span style=&quot;font-size: 27px; font-weight: normal;&quot;&gt;Setting the Warning days before password expire using passwd -w option&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Using the option&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;-w&lt;/strong&gt;&amp;nbsp;along with&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;passwd&lt;/strong&gt;&amp;nbsp;can be used to set the warning days before the password expires.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;western&quot; style=&quot;background-color: #f1f1f1; border-radius: 0px; border: none; box-sizing: border-box; font-family: monospace, monospace; font-size: 15px; margin-top: 24px; overflow: auto; padding: 4px 10px; text-align: start; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;[root@localhost ~]# passwd -w 30 user1
Adjusting aging data for user user1.
passwd: Success
[root@localhost ~]# chage -l user1
Last password change                                    : Apr 21, 2016
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 90
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 30
[root@localhost ~]#&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 15px; line-height: 26px; margin-bottom: 26px; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent;&quot;&gt;Source: Unixmen&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/7949015999343105209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2017/01/password-management-in-gnulinux-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/7949015999343105209'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/7949015999343105209'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2017/01/password-management-in-gnulinux-by.html' title='Password Management in GNU/Linux by using passwd command'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrkvzCWcf4hJDvJ2qK7f7IGjAQm2xBnrAFoFhR9NpISDdmA8pNcLK8avhYju6hJFI4MJEYOzpd1cJv43Y8f99gOGMisXNcSc5dF6TDQv1snTFJI53lKZ6vsPjn7mR6rOWlW7bm2Pe7C8uW/s72-c/password-696x464.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-2108818031727042850</id><published>2013-11-03T19:24:00.000-05:00</published><updated>2013-12-26T19:27:30.584-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe"/><category scheme="http://www.blogger.com/atom/ns#" term="antivirus"/><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="malware analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="reverse engineering"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>[Malware Classifier] Malware Analysis Tool - Adobe</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJDk-KX8hXevjcCHeZJztH2gbEusD1TC23DKj7c_wCmdlw3tA1Wj_2hUoifloA4wjsME7OItq1ksLlXci7AS4xXv2ofNh46PADkgWRZN_ggsGEALYVMn7tKgaSbKTf9ePiihTa1clks8lx/s1600/malware+analysis.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJDk-KX8hXevjcCHeZJztH2gbEusD1TC23DKj7c_wCmdlw3tA1Wj_2hUoifloA4wjsME7OItq1ksLlXci7AS4xXv2ofNh46PADkgWRZN_ggsGEALYVMn7tKgaSbKTf9ePiihTa1clks8lx/s320/malware+analysis.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In this post I am going to talk about a new tool: &quot;Adobe Malware Classifier&quot;, this is a command-line tool that lets antivirus analysts, IT administrators, and security researchers quickly and easily determine if a binary file contains malware, so they can develop malware detection signatures faster, reducing the time in which users&#39; systems are vulnerable.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Malware Classifier uses machine learning algorithms to classify Win32 binaries – EXEs and DLLs – into three classes: 0 for “clean,” 1 for “malicious,” or “UNKNOWN.”&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The tool was developed using models resultant from running the J48, J48 Graft, PART, and Ridor machine-learning algorithms on a dataset of approximately 100,000 malicious programs and 16,000 clean programs.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The tool extracts seven key features from an unknown binary, feeds them to one of the four classifiers or all of them, and presents its classification of the unknown binary.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;usage: AdobeMalwareClassifier.py [-h] [-f filename] [-n model] [-v [verbose]]&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;Classify an unknown binary as MALWARE or CLEAN.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;optional arguments:&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; -h, --help &amp;nbsp; &amp;nbsp;show this help message and exit&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; -f filename &amp;nbsp; The name of the input file&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; -n model &amp;nbsp; &amp;nbsp; &amp;nbsp;The ordinal for model classifier: 0=all (default) | 1=J48 |&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2=J48Graft | 3=PART | 4=Ridor&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; -v [verbose] &amp;nbsp;Dump the PE data being processed&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
You can download this tool from its official site in Sourceforge:&lt;/div&gt;
&lt;a href=&quot;http://sourceforge.net/projects/malclassifier.adobe/files/?source=navbar&quot;&gt;http://sourceforge.net/projects/malclassifier.adobe/files/?source=navbar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/2108818031727042850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/11/malware-classifier-malware-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/2108818031727042850'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/2108818031727042850'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/11/malware-classifier-malware-analysis.html' title='[Malware Classifier] Malware Analysis Tool - Adobe'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJDk-KX8hXevjcCHeZJztH2gbEusD1TC23DKj7c_wCmdlw3tA1Wj_2hUoifloA4wjsME7OItq1ksLlXci7AS4xXv2ofNh46PADkgWRZN_ggsGEALYVMn7tKgaSbKTf9ePiihTa1clks8lx/s72-c/malware+analysis.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-3116306028862263282</id><published>2013-10-03T02:16:00.000-05:00</published><updated>2013-10-03T02:16:00.562-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="ddos"/><category scheme="http://www.blogger.com/atom/ns#" term="dos"/><category scheme="http://www.blogger.com/atom/ns#" term="download"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><category scheme="http://www.blogger.com/atom/ns#" term="web apps"/><category scheme="http://www.blogger.com/atom/ns#" term="web security"/><title type='text'>(D)DoS Deflate - A script designed to Block a Denial of Service Attack</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibH1entR4yivigdAAwXwbKuPiFRgZ9yh-dODGSwk71DWuiqc2Ql5fl9_6dVdL-RrS_9m9nqZkyY4PjXfFHjI4nYt3me705VsAlBX7Pu40RFPAZDREb4h7iuoplnX9GOZt3Hf_Ghyphenhyphen2cfYr/s1600/ddos_attack_diagram_gl.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibH1entR4yivigdAAwXwbKuPiFRgZ9yh-dODGSwk71DWuiqc2Ql5fl9_6dVdL-RrS_9m9nqZkyY4PjXfFHjI4nYt3me705VsAlBX7Pu40RFPAZDREb4h7iuoplnX9GOZt3Hf_Ghyphenhyphen2cfYr/s320/ddos_attack_diagram_gl.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;Nowadays a common problem for many companies is Distributed Denial of Service Attack (DDoS), so in this post is explained: what is a DDoS and a possible solution for it?&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Distributed Denial of Service (DDoS):&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In computing, this attack is an attempt to make a machine (usually a web server) or a network resource unavaliable to its intended users, the reasons for this attack may vary, but it generally consists of efforts to temporarily or indefinitely interrupt or suspend services of a host connected to the Internet, a visual explanation is shown in Figure 1.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd0-xBZ2P6YLcGQFPbI_Zg2UD6zihrYJQkgHby4_RsjdSjBOzcNuLSlyOjrOC8O6hSQbG8BACAXxXk8ZUsLRXxdJV-UhJQ-ujRKG9vHGqJ1_1iiPahIxBW6EmCj7conl-ffzy-wFfrR1sz/s1600/Stachledraht_DDos_Attack.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd0-xBZ2P6YLcGQFPbI_Zg2UD6zihrYJQkgHby4_RsjdSjBOzcNuLSlyOjrOC8O6hSQbG8BACAXxXk8ZUsLRXxdJV-UhJQ-ujRKG9vHGqJ1_1iiPahIxBW6EmCj7conl-ffzy-wFfrR1sz/s400/Stachledraht_DDos_Attack.png&quot; width=&quot;282&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1:&amp;nbsp;Stachledraht DDos Attack Diagram&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
There are some solutions to mitigate this attacks (IDS, IPS, etc.), but today I want to share a new simple tool that can be implemented in your own network:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4RK2tyoOE38I4JEV2-paQbjwtoXGUogC9u_QLriL48azB3z_90lOffMMrlQVXiJ9xRH270SgqpREPlwV5QdQ-BqTYzlN2y0CAmxzT6lFCbYRqFMmT52ux-QPVFuJlbDoCXheyucqViSo/s1600/(D)DoS+Deflate+Banner+-+GL.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;51&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4RK2tyoOE38I4JEV2-paQbjwtoXGUogC9u_QLriL48azB3z_90lOffMMrlQVXiJ9xRH270SgqpREPlwV5QdQ-BqTYzlN2y0CAmxzT6lFCbYRqFMmT52ux-QPVFuJlbDoCXheyucqViSo/s400/(D)DoS+Deflate+Banner+-+GL.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&quot;&lt;i&gt;(D)DoS Deflate is a lightweight bash shell script designed to assist in the process of blocking a denial of service attack. It utilizes the command below to create a list of IP addresses connected to the server, along with their total number of connections. It is one of the simplest and easiest to install solutions at the software level.&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;netstat -ntu | awk &#39;{print $5}&#39; | cut -d: -f1 | sort | uniq -c | sort -n&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;IP addresses with over a pre-configured number of connections are automatically blocked in the server&#39;s firewall, which can be direct iptables or Advanced Policy Firewall (APF). (We highly recommend that you use APF on your server in general, but deflate will work without it.)&quot;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here are some Features:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;It is possible to whitelist IP addresses, via /usr/local/ddos/ignore.ip.list.&lt;/li&gt;
&lt;li&gt;Simple configuration file: /usr/local/ddos/ddos.conf&lt;/li&gt;
&lt;li&gt;IP addresses are automatically unblocked after a preconfigured time limit (default: 600 seconds)&lt;/li&gt;
&lt;li&gt;The script can run at a chosen frequency via the configuration file (default: 1 minute)&lt;/li&gt;
&lt;li&gt;You can receive email alerts when IP addresses are blocked.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;How to install:&lt;/b&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #f9f9f9; border: 1px dotted rgb(226, 226, 226); color: #000066; font-size: 13px; margin-left: 5px; margin-right: 5px; padding: 10px;&quot;&gt;wget http://www.inetbase.com/scripts/ddos/install.sh
chmod 0700 install.sh
./install.sh&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;How to uninstall:&lt;/b&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #f9f9f9; border: 1px dotted rgb(226, 226, 226); color: #000066; font-size: 13px; margin-left: 5px; margin-right: 5px; padding: 10px;&quot;&gt;wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
chmod 0700 uninstall.ddos
./uninstall.ddos&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Configuration:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
After installing the script you need to open the file &quot;ddos.conf&quot; located in &quot;/usr/local/ddos&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Edit the paths according to your system:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;PROGDIR=”/usr/local/ddos”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;PROG=”/usr/local/ddos/ddos.sh”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;IGNORE_IP_LIST=”/usr/local/ddos/ignore.ip.list”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;CRON=”/etc/cron.d/ddos.cron”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;APF=”/etc/apf/apf”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;IPT=”/sbin/iptables”&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Customize the options and its values as you want:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
FREQ=1&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# Frequency in minutes in which the script will be executed&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
NO_OF_CONNECTIONS=150&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# Number of connections received to block an IP address of an alleged attacker&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
APF_BAN=1&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# 1 means that DDoS Deflate will use APF to block, 0 use directly Iptables&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
BAN_PERIOD=600&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# Time (in seconds) to block an attacker.&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
EMAIL_TO=”root”&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# Address to send an email when someone is banned&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
KILL=1&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;# With a 0 value, the attackers won&#39;t be banned, 1 is selected by default&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Official Site: &lt;a href=&quot;http://deflate.medialayer.com/&quot;&gt;deflate.meadialayer.com&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/3116306028862263282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/10/ddos-deflate-script-designed-to-block.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3116306028862263282'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3116306028862263282'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/10/ddos-deflate-script-designed-to-block.html' title='(D)DoS Deflate - A script designed to Block a Denial of Service Attack'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjibH1entR4yivigdAAwXwbKuPiFRgZ9yh-dODGSwk71DWuiqc2Ql5fl9_6dVdL-RrS_9m9nqZkyY4PjXfFHjI4nYt3me705VsAlBX7Pu40RFPAZDREb4h7iuoplnX9GOZt3Hf_Ghyphenhyphen2cfYr/s72-c/ddos_attack_diagram_gl.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-3794469229517426249</id><published>2013-09-03T19:40:00.000-05:00</published><updated>2013-09-03T19:40:03.604-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bing"/><category scheme="http://www.blogger.com/atom/ns#" term="challenge"/><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="defacement."/><category scheme="http://www.blogger.com/atom/ns#" term="eset"/><category scheme="http://www.blogger.com/atom/ns#" term="hack me"/><category scheme="http://www.blogger.com/atom/ns#" term="kali"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="wireshark"/><title type='text'>ESET Security Challenge - Solution</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWwjcRNsnfCAbRdpy6B_b1O6e6FM6xgoLh-km2FE2VY3CjCidiDiJNcfXuZHL4xjIvjtADFoYWwIi9kxfKbCo2teE1-RdR6wwWcF0U3ryq0bRBzctb-6lrNcb11Z0VGHT50fz6tLEsuD0Y/s1600/Foobar+Search+Engine+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWwjcRNsnfCAbRdpy6B_b1O6e6FM6xgoLh-km2FE2VY3CjCidiDiJNcfXuZHL4xjIvjtADFoYWwIi9kxfKbCo2teE1-RdR6wwWcF0U3ryq0bRBzctb-6lrNcb11Z0VGHT50fz6tLEsuD0Y/s400/Foobar+Search+Engine+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1: New Search Engine in Development&lt;/div&gt;
&lt;b&gt;Scenario:&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A malicious code had access to a small enterprise of web developers, who are working on building a new search engine that will be participating on the market. Figure 1 shows a screenshot of the new project.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
To verify the functionalities of this new search engine, we are going to make some tests. First, we will enter the word &quot;trololo&quot; to see the results. The server response to the request mentioned above is:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdfGm3AS4l3vk_4ZczkteQ1Ad5STa2QWT3UribPafTgdg3nCdD2AzJyTbyCGwysIC3BF5fCDD4vCcTiXpeGaM2Waz6Qpq86zLf1KFwK2BtzCjG14AZb0L_JwKfqCY4bgj-mGwWebNlinNo/s1600/Search+Results+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdfGm3AS4l3vk_4ZczkteQ1Ad5STa2QWT3UribPafTgdg3nCdD2AzJyTbyCGwysIC3BF5fCDD4vCcTiXpeGaM2Waz6Qpq86zLf1KFwK2BtzCjG14AZb0L_JwKfqCY4bgj-mGwWebNlinNo/s400/Search+Results+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 2: Search results for trololo of the new project&lt;/div&gt;
&lt;br /&gt;
As you can see, this modest search engine is not ready to compete in the market, since the database is still very small, and only responds to keywords like &quot;facebook&quot; or &quot;trololo&quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfHZEPZ02xwxK7JnLKUuaNacQUek0o_9-8uhqfqKcFupxVs43Drrey-mbNpVTuPfRGx1_jbgmanSHpumM9mtyMPdaTibXY_cxaV4tjwtzwLn3d0SFxznDxC19yyF3hfLchdJ1KhDUXgqq4/s1600/Search+Results+2+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfHZEPZ02xwxK7JnLKUuaNacQUek0o_9-8uhqfqKcFupxVs43Drrey-mbNpVTuPfRGx1_jbgmanSHpumM9mtyMPdaTibXY_cxaV4tjwtzwLn3d0SFxznDxC19yyF3hfLchdJ1KhDUXgqq4/s400/Search+Results+2+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3: Search results for facebook of the new project&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Because the database is so poor, the developer has decided to redirect searches to other popular search engine in case that you don&#39;t get results. For example, let&#39;s try it with the word &quot;nirvana&quot; which is not found in the database corresponding to the new project:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWjQAKCYJQESJZm-rZAVeEA5ImQaMStcMxaPbYJhyphenhyphen5IplfuptPJvlRrQqw8zufzb16zmFRZ4xiI7bvF3SU1bQoKxp-sBxOkBfn1jeZf86jAHvlMXEzcPExp0vVEHkEE5bZ4JOoYw8qFoTD/s1600/Nirvana+Search+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWjQAKCYJQESJZm-rZAVeEA5ImQaMStcMxaPbYJhyphenhyphen5IplfuptPJvlRrQqw8zufzb16zmFRZ4xiI7bvF3SU1bQoKxp-sBxOkBfn1jeZf86jAHvlMXEzcPExp0vVEHkEE5bZ4JOoYw8qFoTD/s400/Nirvana+Search+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 4: Nirvana Search in the new project&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The search is redirected to another search engine and the result can be seen below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0lH5X4mX28kG4lJ_d8W1VTxcQzBnPxauCiTN4RxlmixXWhMpatMnYfrCTz6tyKCz3i7iFSJtlYWjtRxPKSIcfijNPikobhZgjaUhbvaP03xhzzIZ41xLwYMzg5K5euKFPg5McMhsPxtdZ/s1600/Nirvana+Bing+Results+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0lH5X4mX28kG4lJ_d8W1VTxcQzBnPxauCiTN4RxlmixXWhMpatMnYfrCTz6tyKCz3i7iFSJtlYWjtRxPKSIcfijNPikobhZgjaUhbvaP03xhzzIZ41xLwYMzg5K5euKFPg5McMhsPxtdZ/s400/Nirvana+Bing+Results+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5: Nirvana Search Results on Bing&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
As you can see, the previous action aims to continue loading the database based on the response of the other search engines. Broadly speaking, we can understand how the server works.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The problem seems to be that this company has an internal attacker, who was devoted to analyzing vulnerabilities in the search engine, even knowing that it was an alpha version. Additionally, remember that there is a malware that is actively reporting all traffic from the internal network to the outside thereby filtering sensitive information.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div&gt;
A capture of the final traffic sent by the malware can be &lt;a href=&quot;https://docs.google.com/file/d/0B4VMR1zMBjhONXhRRktQbFdLQzA/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;downloaded here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
Finally, after four days, the server was found in the following state:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOiSexih7G20wTerDU7kT6IE_vaO38wsxbgrhTIfYlBeUP0GBksWGUjMx-2Kmf05TT34S1VSoqKSzpDK6EyW5_KUZJlMtRXpRm2qj70IZHh4FrNVS_a_2urbpxucxYrNnPh0svtQzBBYP/s1600/Defacement+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOiSexih7G20wTerDU7kT6IE_vaO38wsxbgrhTIfYlBeUP0GBksWGUjMx-2Kmf05TT34S1VSoqKSzpDK6EyW5_KUZJlMtRXpRm2qj70IZHh4FrNVS_a_2urbpxucxYrNnPh0svtQzBBYP/s400/Defacement+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 6: Defacement of the search engine&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Your job will be to see if it is an external attack executed by the malware author who infiltrated the systems, or whether it is an internal attack. To accomplish this objective You will have to verify the capture available to see if you can get the password of the administrator of that site. If it is possible, what is the password?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Note: In case you find irrefutable proof of his innocence, leave a comment and then develop a small tutorial, demonstrating the accuracy of the analysis. Apparently, only the root user had permissions to modify the files in the web.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;/div&gt;
First, we need a tool to open the file, you can download Wireshark for this purpose, after that, we need to find something unusual in the traffic, as shown in Figure 7, there is an access to a FTP server where a file named data-intrusion.rar was downloaded:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhip5gQOqIAy00T8dn6Dfba6yhaauKtL0_qacpICyOYg5WCcPCsx-XdXBKsSrDR-udC7SYac4EnRjRmyEWUTiiktAB1cd30IDq1f97cV_FchTvZeKVloHK610JWjO6vRrnkWhOuOPsviurL/s1600/0.+Wireshark+FTP+Filter+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhip5gQOqIAy00T8dn6Dfba6yhaauKtL0_qacpICyOYg5WCcPCsx-XdXBKsSrDR-udC7SYac4EnRjRmyEWUTiiktAB1cd30IDq1f97cV_FchTvZeKVloHK610JWjO6vRrnkWhOuOPsviurL/s400/0.+Wireshark+FTP+Filter+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 7: FTP Server Access on Wireshark&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In order to get a better view of this traffic we can use the option &quot;Follow TCP Stream&quot;, let&#39;s see the results:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmzMr26IHiZcmNB0DuSDV0ecwXLedz71vVvOw3IEiY7Oew95WuZdGa6LGlSWulxaBpD_NNJhWhILUokhCYYsIhHFxuTcjDUHFknEps1LlkYDxjA8m_n29XDNKdXfWxWxaHNF9IwBbWVu8D/s1600/1.+Follow+TCP+Stream+on+Wireshark+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmzMr26IHiZcmNB0DuSDV0ecwXLedz71vVvOw3IEiY7Oew95WuZdGa6LGlSWulxaBpD_NNJhWhILUokhCYYsIhHFxuTcjDUHFknEps1LlkYDxjA8m_n29XDNKdXfWxWxaHNF9IwBbWVu8D/s400/1.+Follow+TCP+Stream+on+Wireshark+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 8: &quot;Follow TCP Stream&quot; of FTP Server&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
With this information we can see the credentials that were used to access to the server and the file that was downloaded, then we are going to reassemble the file and see what it contains:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZHJFT0tOTIiVvCR-gOZH7upWigsUgGijcGZBEQfRV-yBpGXBZjtFwxWrtmL-8wtEAoTkYekHMHK33hvyVwxylh_Rewz1KaEl5s-kC_QvpcyAnH-7xx8sFBh-N3WfyjMNIIQNrwUe_0zkO/s1600/2.+Searching+for+data-instrusion.rar+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZHJFT0tOTIiVvCR-gOZH7upWigsUgGijcGZBEQfRV-yBpGXBZjtFwxWrtmL-8wtEAoTkYekHMHK33hvyVwxylh_Rewz1KaEl5s-kC_QvpcyAnH-7xx8sFBh-N3WfyjMNIIQNrwUe_0zkO/s400/2.+Searching+for+data-instrusion.rar+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 9: This Image shows the transfer of &quot;data-intrusion.rar&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
And the next Figure shows the &quot;Follow TCP Stream&quot; of the RAR File in Raw:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilFyntW6WYI2oTbvLwJMIfHRt3zf56pSYSDVTgD4L3Ne1UE9u16bB_iOlmWb-FMzski8NRD4vAzPw39OUWQIrh-Sg0bihBskw0goGqSl3M6RMdBvHXhM8lcavNKAzbcRQ0vpXUhjlQVLH_/s1600/3.+Follow+TCP+Stream+of+data-intrusion.rar+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilFyntW6WYI2oTbvLwJMIfHRt3zf56pSYSDVTgD4L3Ne1UE9u16bB_iOlmWb-FMzski8NRD4vAzPw39OUWQIrh-Sg0bihBskw0goGqSl3M6RMdBvHXhM8lcavNKAzbcRQ0vpXUhjlQVLH_/s320/3.+Follow+TCP+Stream+of+data-intrusion.rar+-+GL.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 10: &quot;Follow TCP Stream&quot; of &quot;data-intrusion.rar&quot; in Raw&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
This stream can be&amp;nbsp;reassembled by pressing &quot;Save as&quot;, then name it as you want, but don&#39;t forget the &quot;.rar&quot; extension:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4TuUuDHAWCIgxmf72yfMk690cSNCJ3GMeRUSvvV3GyrLsR1Bcyjro0F58xfUvVkKZYmobwZMZZplkomkD33yDBy0MAnRuqucsE3soY0E_89CpHyW9ofdEsGQ66_5i6rj2eburpqfnCO-/s1600/4.+data-intrusion.rar+reassembled+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4TuUuDHAWCIgxmf72yfMk690cSNCJ3GMeRUSvvV3GyrLsR1Bcyjro0F58xfUvVkKZYmobwZMZZplkomkD33yDBy0MAnRuqucsE3soY0E_89CpHyW9ofdEsGQ66_5i6rj2eburpqfnCO-/s400/4.+data-intrusion.rar+reassembled+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 11: &quot;data-intrusion.rar&quot; contains access.log&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In the file &quot;access.log&quot; we can see all the requests made to the server and an interesting thing is that the server was attacked by an automated tool to inject SQL sentences.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9aKm0W5a4c1dA1SoeqeZkMCiuOgUHYmIx71UAQ59BuSL7LgoSZtq8-XpUAcI6K3WHqTia-vdHePvTDqi-8Q2reUTngCw0IGVrSmkHjA-IQvbpS6Qy3Elnkkv4gnjpA7eoa_tqPCMyxc2h/s1600/5.+access.log+SQLi+Found+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9aKm0W5a4c1dA1SoeqeZkMCiuOgUHYmIx71UAQ59BuSL7LgoSZtq8-XpUAcI6K3WHqTia-vdHePvTDqi-8Q2reUTngCw0IGVrSmkHjA-IQvbpS6Qy3Elnkkv4gnjpA7eoa_tqPCMyxc2h/s400/5.+access.log+SQLi+Found+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 12: SQLi requests by an automated tool (sqlmap)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In this case, the log file shows the requests but these are encoded, to learn more about this, please follow this link: HTML URL Encoding Reference&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
So we need to decode them, in order to make them easier to understand, you can use any tool for that purpose (I used a web app):&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggBsMkfvWFBPAgaj2rEKRK735YmJMzu5nF3VbMiESNXaCbul24RkWFMAyu9Djdj5uFhMPM5XIs2y1o_hvv6IXs2uATUB26RmP9YjMMKicTMVhUAnT7MhNuy_TyrFOWYvdA5tXMdHCPMktK/s1600/6.+access.log+with+Clean+SQLi+Found+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggBsMkfvWFBPAgaj2rEKRK735YmJMzu5nF3VbMiESNXaCbul24RkWFMAyu9Djdj5uFhMPM5XIs2y1o_hvv6IXs2uATUB26RmP9YjMMKicTMVhUAnT7MhNuy_TyrFOWYvdA5tXMdHCPMktK/s400/6.+access.log+with+Clean+SQLi+Found+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 13: SQLi requests decoded (Easier to understand).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Example of one of the requests found in the log file:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&quot;GET /search.php?q=facebook&#39; AND ORD(MID((SELECT IFNULL(CAST(user AS CHAR),0x20) FROM challenge.users ORDER BY id LIMIT 1,1),5,1)) &amp;gt; 116 AND &#39;zJfx&#39;=&#39;zJfx HTTP/1.1&quot; 302 622 &quot;-&quot; &quot;sqlmap/1.0-dev (1bae9955b7) (http://www.sqlmap.org)&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
We can see that the tool (sqlmap) made some requests with the objective of getting a dump of the database, the tool is using the keyword &quot;facebook&quot; that would return a 200 code, with this the attacker can dump sensible information, to verify this, we can create a script that shows the results of the requests:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEice6OGFyM2AKRSA_h6eB2k537Yc96ElTE_Co7CjBLyHvOBx7FznxT5ve8npbtQqdGUHXS3wu_DkMT6IdJJXQlfCRjVzgp8d7nIYpnge1_gqzTghhdwITcvVwLmiMsFjx1hFHpm5DAnotmO/s1600/7.+Script+to+extract+Info+from+access.log+-+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEice6OGFyM2AKRSA_h6eB2k537Yc96ElTE_Co7CjBLyHvOBx7FznxT5ve8npbtQqdGUHXS3wu_DkMT6IdJJXQlfCRjVzgp8d7nIYpnge1_gqzTghhdwITcvVwLmiMsFjx1hFHpm5DAnotmO/s400/7.+Script+to+extract+Info+from+access.log+-+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 14: Script to extract useful information from access.log&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In Figure 14, we can see the users &amp;amp; passwords that were extracted by the attacker, the last 2 lines are md5 hashes that can easily be cracked.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Decrypted Info:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
user:&lt;b&gt; &lt;i&gt;root&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
password:&lt;b&gt;&amp;nbsp;&lt;i&gt;pepe&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
user:&lt;b&gt; &lt;i&gt;guest&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
password:&lt;b&gt;&amp;nbsp;&lt;i&gt;hacker&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
With these credentials the external attacker can easily make a defacement, so with this we verify that there is no internal attacker, or in this case, the internal attacker was not responsible for the defacement.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/3794469229517426249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/09/eset-security-challenge-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3794469229517426249'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3794469229517426249'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/09/eset-security-challenge-solution.html' title='ESET Security Challenge - Solution'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWwjcRNsnfCAbRdpy6B_b1O6e6FM6xgoLh-km2FE2VY3CjCidiDiJNcfXuZHL4xjIvjtADFoYWwIi9kxfKbCo2teE1-RdR6wwWcF0U3ryq0bRBzctb-6lrNcb11Z0VGHT50fz6tLEsuD0Y/s72-c/Foobar+Search+Engine+-+GL.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-4826149202232883736</id><published>2013-08-03T07:36:00.000-05:00</published><updated>2013-08-05T07:43:45.083-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bypass"/><category scheme="http://www.blogger.com/atom/ns#" term="cracking"/><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="login"/><category scheme="http://www.blogger.com/atom/ns#" term="reverse engineering"/><title type='text'>Cracking a Simple Application (ByPass Login)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD-ZBIMTQ3ZOGiub9ogjuY0lzNSpnEfaAdNCkNGPyd7ZXGj29tuZLunseBeOwF8GIf_ahhhylycFURxNi4ZbdXespSMhKSSTGZExdR5Yrldykwz08cSGqeHjOqfT8NHjyID2yBOD6D6Xgj/s1600/0.+Crackme+Main+Screen+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD-ZBIMTQ3ZOGiub9ogjuY0lzNSpnEfaAdNCkNGPyd7ZXGj29tuZLunseBeOwF8GIf_ahhhylycFURxNi4ZbdXespSMhKSSTGZExdR5Yrldykwz08cSGqeHjOqfT8NHjyID2yBOD6D6Xgj/s1600/0.+Crackme+Main+Screen+GL.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In this post I am going to explain how to solve a &quot;Crackme&quot; challenge that I found on the Internet, in this example you can see a Login form but we don&#39;t know the Username or the Password, so what do you think could be a possible solution?, or the first step to solve it?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Well, maybe you thought that you can run a brute force tool against the login form, that is not a wrong answer but it isn&#39;t the best, so first of all I am going to write test values on the text boxes to see how the application works.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaLYgY0AJJy2jD1PtHds278e_cxwIH84uyjAI-wGIhfT7TaICcU2XjehnMhVuO8FcScAMMLQBecvGGdDKOWiJGQm7hRu6qGL2xIHAPVff3ogPsXxlyfQaWZqdPKjUZ8-EZZyhBz5zt06bE/s1600/1.+Trying+Test+Credentials+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaLYgY0AJJy2jD1PtHds278e_cxwIH84uyjAI-wGIhfT7TaICcU2XjehnMhVuO8FcScAMMLQBecvGGdDKOWiJGQm7hRu6qGL2xIHAPVff3ogPsXxlyfQaWZqdPKjUZ8-EZZyhBz5zt06bE/s320/1.+Trying+Test+Credentials+GL.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1: The Application returns an Error Message Box when the Credentials are wrong.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The next step is to verify if the application is Packed, I mean protected, this technique is used to make harder the Analyst work and also to hide the programming language in which this application was developed.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN4BFA3vTkBySL5S8Rm4RDZ_8hHQMd2lW3yVKa3fED6pj4A4VknO7uyhWY2zpyXJa_gAY_Ady-IJ5dShyphenhyphenozaOGuII_PqOaABiBGXqye1vfN6t5dx96zX9JVWP86KjFfOdCWDNfH43pr-ms/s1600/2.+Identifiying+Crackme+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN4BFA3vTkBySL5S8Rm4RDZ_8hHQMd2lW3yVKa3fED6pj4A4VknO7uyhWY2zpyXJa_gAY_Ady-IJ5dShyphenhyphenozaOGuII_PqOaABiBGXqye1vfN6t5dx96zX9JVWP86KjFfOdCWDNfH43pr-ms/s320/2.+Identifiying+Crackme+GL.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 2: The Application was developed in &quot;Microsoft Visual C# / Basic .NET&quot; and it isn&#39;t packed!!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
With this information the Analyst must be very happy, because this means that cracking the application will be much easier than expected.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij6LIahBruQsJGjTVBC8Uj6XhE4XZcjR6bkT8hx-6ffCKghpnpcF0p6MAp2d7CLfwywijqH9Iyz4z5rR_qJd-m-e5oMESfHYs6xXGV2t0dle6aGbD16GXQehN75XlrmqbdbOY-bfEjK8lu/s1600/Everything_went_better_than_expected_Cracking_challenge_GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij6LIahBruQsJGjTVBC8Uj6XhE4XZcjR6bkT8hx-6ffCKghpnpcF0p6MAp2d7CLfwywijqH9Iyz4z5rR_qJd-m-e5oMESfHYs6xXGV2t0dle6aGbD16GXQehN75XlrmqbdbOY-bfEjK8lu/s200/Everything_went_better_than_expected_Cracking_challenge_GL.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3: My face when I saw the previous results. =D&lt;/div&gt;
&lt;br /&gt;
What&#39;s next?, now We need a tool that allow us to see the functions (source code) that are implemented within the &quot;.exe&quot; file.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB0mSzjsFfoxtXJL6MUr11171gimithbI5x6_tYO50gIIFHLOrJi-T0xPTkfpAuEt1HLYSPl4m16ENZep7hSjBbfkjmjIagrtFdAzHKJCgPtlScZDYe8DmQsuezQhaZnwyNiAdH9BW4xBs/s1600/3.+Cracking+Crackme+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB0mSzjsFfoxtXJL6MUr11171gimithbI5x6_tYO50gIIFHLOrJi-T0xPTkfpAuEt1HLYSPl4m16ENZep7hSjBbfkjmjIagrtFdAzHKJCgPtlScZDYe8DmQsuezQhaZnwyNiAdH9BW4xBs/s400/3.+Cracking+Crackme+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 4: This image shows the source code of the function that is called when the Login button is pressed.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In figure 4, We can see some interesting and maybe useful information, let&#39;s pay attention to the red text (the strings), specially the ones that weren&#39;t visible during the test phase when we entered wrong values.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We can see a string that may be a username: &quot;|Usuario|&quot; and another one that could be a possible password: &amp;nbsp;&quot;|J5L2C-K4B8L-D2K9S|&quot;, so let&#39;s try this combination in the text boxes to see what happens?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp_4ibkNeYAMZCkB390IsrtvutXvqjL2RNzF8MhZu-sy81Gz87eYAsrCMpq6mQxvgp1pNCFNebV1HL8XPrnfMiehjZL_7jO_1f5f_AJvJBuuH1qKlvdE7OLC6oTfYgNJiH4RxPjpPioJBE/s1600/4.+Correclty+Cracked+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;107&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp_4ibkNeYAMZCkB390IsrtvutXvqjL2RNzF8MhZu-sy81Gz87eYAsrCMpq6mQxvgp1pNCFNebV1HL8XPrnfMiehjZL_7jO_1f5f_AJvJBuuH1qKlvdE7OLC6oTfYgNJiH4RxPjpPioJBE/s320/4.+Correclty+Cracked+GL.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5: A successful message appears when using the login information found before.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSjUj7ch6VU_nMdnkwFeMlrSIR5exRo5ruW9N8itz-sKCX1-W4XDJ68aJzu3ElOZmeVw0_gEuXQ5R1c97zLdK4tJLdefu-QMfzLtSIJW1hAZ09MUTCFbw3Wvb89XTKeOHB67nzmkU9gdpi/s1600/fuck-yea-meme-GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSjUj7ch6VU_nMdnkwFeMlrSIR5exRo5ruW9N8itz-sKCX1-W4XDJ68aJzu3ElOZmeVw0_gEuXQ5R1c97zLdK4tJLdefu-QMfzLtSIJW1hAZ09MUTCFbw3Wvb89XTKeOHB67nzmkU9gdpi/s200/fuck-yea-meme-GL.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 6: The feeling of every malware researcher after a successful job.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Now maybe you have a better idea of how some cracks and key generators are created, well, that&#39;s all, hope you enjoyed with this post,&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
I also analyzed this crackme challenge to verify if its clean, you can see the complet report here:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;a href=&quot;https://www.virustotal.com/es/file/fd4447ef41a34d4f40b3f315a2e9b9ab0c80fe8753cf4b3afd831d9eaddf76cd/analysis/&quot;&gt;https://www.virustotal.com/es/file/fd4447ef41a34d4f40b3f315a2e9b9ab0c80fe8753cf4b3afd831d9eaddf76cd/analysis/&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/4826149202232883736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/08/cracking-simple-application-bypass-login.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4826149202232883736'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4826149202232883736'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/08/cracking-simple-application-bypass-login.html' title='Cracking a Simple Application (ByPass Login)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD-ZBIMTQ3ZOGiub9ogjuY0lzNSpnEfaAdNCkNGPyd7ZXGj29tuZLunseBeOwF8GIf_ahhhylycFURxNi4ZbdXespSMhKSSTGZExdR5Yrldykwz08cSGqeHjOqfT8NHjyID2yBOD6D6Xgj/s72-c/0.+Crackme+Main+Screen+GL.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-8461901279548322106</id><published>2013-07-03T17:43:00.000-05:00</published><updated>2013-08-05T11:56:48.454-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity"/><category scheme="http://www.blogger.com/atom/ns#" term="hacking"/><category scheme="http://www.blogger.com/atom/ns#" term="infection"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="social engineering"/><category scheme="http://www.blogger.com/atom/ns#" term="spreading"/><title type='text'>How can you be fooled by the U+202E trick?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8_DY9GLRL8TUeE1AI3Xh7bgZTQOgKisb6zgKeSyHCDbihWVYYPkh28QrZyZYttizYZVzS5Kpkt7RCUJXkaoSJBb9y5v25N8fBt5ZdAzt7NZq-PpGK3qz0fzKsaOkv8XcW8pdiXyGO9UAH/s1600/u202e-GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8_DY9GLRL8TUeE1AI3Xh7bgZTQOgKisb6zgKeSyHCDbihWVYYPkh28QrZyZYttizYZVzS5Kpkt7RCUJXkaoSJBb9y5v25N8fBt5ZdAzt7NZq-PpGK3qz0fzKsaOkv8XcW8pdiXyGO9UAH/s200/u202e-GL.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
A common technique, used by malicious attackers to fool their victims, is using the Unicode special character U+202E known as an annulment from right to left to make the malicious file appears as a PDF document instead of a potentially dangerous executable file.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
To understand this concept, let&#39;s imagine that our malicious file is &quot;document.exe&quot; (see Figure 1):&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_R9-DHUdg03U2GCMEl1mOq4fZnf8ILFcEWkTfFUF5Fa4_EWGJuqTS1PDwElwrAwWT8tEfW2q39GGse1KI7UGgGS3013bitNKy_kGMZv_n__j-P3KZjjLkVbLD4Du5UkDSdQcOQBKtVIta/s1600/0.+Original+Malicious+File+GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_R9-DHUdg03U2GCMEl1mOq4fZnf8ILFcEWkTfFUF5Fa4_EWGJuqTS1PDwElwrAwWT8tEfW2q39GGse1KI7UGgGS3013bitNKy_kGMZv_n__j-P3KZjjLkVbLD4Du5UkDSdQcOQBKtVIta/s1600/0.+Original+Malicious+File+GL.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1: Malicious file recently created with no changes.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Now we are going to follow the steps below to accomplish our goal:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Open the Windows Character Map (Start, Run, charmap)&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Find and Copy the Unicode character U+202E. Notice that at the bottom left shows the ASCII value of the characters (see Figure 2).&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8_DY9GLRL8TUeE1AI3Xh7bgZTQOgKisb6zgKeSyHCDbihWVYYPkh28QrZyZYttizYZVzS5Kpkt7RCUJXkaoSJBb9y5v25N8fBt5ZdAzt7NZq-PpGK3qz0fzKsaOkv8XcW8pdiXyGO9UAH/s1600/u202e-GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8_DY9GLRL8TUeE1AI3Xh7bgZTQOgKisb6zgKeSyHCDbihWVYYPkh28QrZyZYttizYZVzS5Kpkt7RCUJXkaoSJBb9y5v25N8fBt5ZdAzt7NZq-PpGK3qz0fzKsaOkv8XcW8pdiXyGO9UAH/s400/u202e-GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 2: Charmap with U+202E selected and copied.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Paste (Ctrl + V) the character just before the extension point: &quot;document[[U+202E]].exe&quot;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Enter the extension that you want but in reverse, for example, if we want &quot;doc&quot;, we need to write &quot;cod&quot;, or if we want &quot;pdf&quot;, then we need to write &quot;fdp&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;The result will be something like the file shown in Figure 3.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjtIi52NpCEZe8pRzdCs3aRlM4QYL6T4TvRUPVG7ZQBGdnKodYg0Q27gMMliN-6MJnL7l36_9fLag3uLiqNPyQzpSX8KEQI3YesiszA6VoKMeO-RxAsQkOpuBWrXmJzFORI4ZTaAZDVyN/s1600/1.+Malicious+File+renamed+GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjtIi52NpCEZe8pRzdCs3aRlM4QYL6T4TvRUPVG7ZQBGdnKodYg0Q27gMMliN-6MJnL7l36_9fLag3uLiqNPyQzpSX8KEQI3YesiszA6VoKMeO-RxAsQkOpuBWrXmJzFORI4ZTaAZDVyN/s1600/1.+Malicious+File+renamed+GL.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3: Malicious file renamed with the special character.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
(The real name of the file without the special character should be: &quot;documentfdp.exe&quot;)&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Finally, to perfect the infection vector, a good idea would be to change the icon of the malicious file and also use a name that can trick the user, considering that the &quot;exe&quot; or the original extension must remain. E.g.:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG23v3cC26yhVU0U5NY2cT-JAaKKSU2P_4_fcEzBWbD7mF-j92Y2GWQ3Wx2i0CbVmbWXbfE7AEQBs9sfmTLmPYruKVo2CoiDH1EQrZPTKshPvduQ3rP6rW_hYRSqggk6TadhOhQdyuJqya/s1600/2.+Malicious+file+with+Word+icon+and+tricky+Name+GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG23v3cC26yhVU0U5NY2cT-JAaKKSU2P_4_fcEzBWbD7mF-j92Y2GWQ3Wx2i0CbVmbWXbfE7AEQBs9sfmTLmPYruKVo2CoiDH1EQrZPTKshPvduQ3rP6rW_hYRSqggk6TadhOhQdyuJqya/s1600/2.+Malicious+file+with+Word+icon+and+tricky+Name+GL.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 4: Malicious file disguised as a Microsoft Word file, with a tricky name in order to preserve the original extension and fool the user.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The malicious file is ready to be delivered to the target and the following happens:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRxLJBof231eiCoggKN-X86-G2iL8N4AaIlwv1czmyBqovUBXdC5g0UEeo3ZfUDp7XwCnHMXMhTKEIRUZKz1z-jgZn2kW_TmLJsiMweIYPWfWeLY8m1-pGlPXvlL1qdgRYkVZjGpU5uyry/s1600/Malware+Infection+Flow+-+GL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRxLJBof231eiCoggKN-X86-G2iL8N4AaIlwv1czmyBqovUBXdC5g0UEeo3ZfUDp7XwCnHMXMhTKEIRUZKz1z-jgZn2kW_TmLJsiMweIYPWfWeLY8m1-pGlPXvlL1qdgRYkVZjGpU5uyry/s400/Malware+Infection+Flow+-+GL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5: Common Infection Flow (TrendMicro)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
If the victim executes the malware (Double Click or Enter), the following screen would appear:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcJqqBE1R-DYdQFFrRmnijI3LpD0Adm_Im1TOf_O0WUz1g4xxFs3QZ24q1iujxxRcJ6f5KwO_crvVEz3EvTr2y9UFNcvLgC6ko3ZC226NkhGPay_LywGUrhZaNG6gR9aEAZpfY2tSD8RX3/s1600/3.+Executing+Malicious+File+with+Double+Click+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcJqqBE1R-DYdQFFrRmnijI3LpD0Adm_Im1TOf_O0WUz1g4xxFs3QZ24q1iujxxRcJ6f5KwO_crvVEz3EvTr2y9UFNcvLgC6ko3ZC226NkhGPay_LywGUrhZaNG6gR9aEAZpfY2tSD8RX3/s400/3.+Executing+Malicious+File+with+Double+Click+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 6: Malicious File starts a command prompt and shows a message: &quot;Hello World&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now, let&#39;s look at the title of the shell: &quot;annexe.doc&quot;, apparently our technique is almost perfect because we can&#39;t see the original extension even in the command line, or we can?&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Possible Countermeasures:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;If we try to rename the file (F2), we will see something strange, this effect is produced by the special character, so this is a clue to realize that something is wrong.&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;If you are in a GNU/Linux based system, you can check the headers of the file with some commands.&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Another trick that you can use to verify the name of any file and its extension could be using the command prompt, but how?&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
To prove this theory we need to open a new &quot;cmd.exe&quot; in the location of the suspicious file, after that, we write the first two characters of the name and press &quot;Tab&quot;, the system will autocompletes the true name, then we will know the truth!! (See Figure 7).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt0iNpy8Wf4OMQhYgHtCAn5NYnVYfafg1bxf1upBT85dBKSpMXVTz18zpyh8Gv8cYN6kvGTNfiH4UQ6_Jcvomt-_X4zohUEijomQJrdfEEFNAzxYrDSf0Huqr425_sJjvFQo5bV84Z9t8A/s1600/4.+Possible+Solution+to+this+trick+GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt0iNpy8Wf4OMQhYgHtCAn5NYnVYfafg1bxf1upBT85dBKSpMXVTz18zpyh8Gv8cYN6kvGTNfiH4UQ6_Jcvomt-_X4zohUEijomQJrdfEEFNAzxYrDSf0Huqr425_sJjvFQo5bV84Z9t8A/s400/4.+Possible+Solution+to+this+trick+GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 7: Revealing the true name of the suspicious file and executing it.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
As shown in Figure 7, the name of the file has (one or more) strange characters that aren&#39;t recognized and are shown as 2 question marks, revealing the presence of the &quot;U+202E&quot; character, that&#39;s all, hope you like this post. =)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Source of Figure 5:&amp;nbsp;&lt;a href=&quot;http://blog.trendmicro.es/bot-zeus-y-conexion-kneber/&quot;&gt;http://blog.trendmicro.es/bot-zeus-y-conexion-kneber/&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/8461901279548322106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/07/how-can-you-be-fooled-by-u202e-trick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/8461901279548322106'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/8461901279548322106'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/07/how-can-you-be-fooled-by-u202e-trick.html' title='How can you be fooled by the U+202E trick?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8_DY9GLRL8TUeE1AI3Xh7bgZTQOgKisb6zgKeSyHCDbihWVYYPkh28QrZyZYttizYZVzS5Kpkt7RCUJXkaoSJBb9y5v25N8fBt5ZdAzt7NZq-PpGK3qz0fzKsaOkv8XcW8pdiXyGO9UAH/s72-c/u202e-GL.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-7018723360054407086</id><published>2013-06-03T06:13:00.000-05:00</published><updated>2013-07-24T17:22:42.724-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="antivirus"/><category scheme="http://www.blogger.com/atom/ns#" term="computer research"/><category scheme="http://www.blogger.com/atom/ns#" term="eicar"/><category scheme="http://www.blogger.com/atom/ns#" term="fake virus"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="test case"/><title type='text'>Test if your Anti-Malware suite is good enough to Protect your Computer</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjBzEHb4ftk9M2KD8yFATnfjp6McXSQvhdoUjB0VUttRjB9mAmdlNTNmiuKc9pSudvyJv3tKqkUZobY21L2stWl7JmMeqjIDgfF_czNaF9AoddkyuS76xphIVi5O6tgBldCVjXz7Lb3TJ/s1600/EICAR_Test_GL.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjBzEHb4ftk9M2KD8yFATnfjp6McXSQvhdoUjB0VUttRjB9mAmdlNTNmiuKc9pSudvyJv3tKqkUZobY21L2stWl7JmMeqjIDgfF_czNaF9AoddkyuS76xphIVi5O6tgBldCVjXz7Lb3TJ/s400/EICAR_Test_GL.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
EICAR Test File&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The EICAR Standard Anti-Virus Test File or EICAR test file is a computer file that was developed by the &lt;a href=&quot;http://www.eicar.org/&quot; target=&quot;_blank&quot;&gt;European Institute for Computer Antivirus Research (EICAR)&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/CARO&quot; target=&quot;_blank&quot;&gt;Computer Antivirus Research Organization (CARO)&lt;/a&gt;, to test the response of computer antivirus (AV) programs. Instead of using real malware, which could do real damage, this test file allows people to test anti-virus software without having to use a real computer virus.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Anti-virus programmers set the EICAR string as a verified virus, similar to other identified signatures. A compliant virus scanner, when detecting the file, will respond in exactly the same manner as if it found a harmful virus. Not all virus scanners are compliant, and may not detect the file even when they are correctly configured.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The use of the EICAR test string can be more versatile than straightforward detection: a file containing the EICAR test string can be compressed or archived, and then the antivirus software can be run to see whether it can detect the test string in the compressed file.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;How this File was Designed?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The file is a text file of either 68 or 70 bytes that is a legitimate executable file called a COM file that can be run by Microsoft operating systems and some work-alikes (except for 64-bit due to 16-bit limitations), including OS/2. When executed, the EICAR test file will print &quot;EICAR-STANDARD-ANTIVIRUS-TEST-FILE!&quot; and then will stop. The test string was engineered to consist of ASCII human-readable characters, easily created using a standard computer keyboard. It makes use of self-modifying code to work around technical issues that this constraint imposes on the execution of the test string.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The EICAR Test string reads:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;code&gt;
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
You can download the EICAR File from the Official Site, here You can choose various scenarios:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.eicar.org/download/eicar.com&quot;&gt;http://www.eicar.org/download/eicar.com&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (A &quot;.COM&quot; File)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.eicar.org/download/eicar.com.txt&quot;&gt;http://www.eicar.org/download/eicar.com.txt&lt;/a&gt;&amp;nbsp; &amp;nbsp;(A &quot;.TXT&quot; with the same Content)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.eicar.org/download/eicar_com.zip&quot;&gt;http://www.eicar.org/download/eicar_com.zip&lt;/a&gt;&amp;nbsp;(The same file &quot;.COM&quot; but compressed)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.eicar.org/download/eicarcom2.zip&quot;&gt;http://www.eicar.org/download/eicarcom2.zip&lt;/a&gt;&amp;nbsp;(The same file &quot;.TXT&quot; but compressed)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;If you have an Internet Security Suite, this application may prevent the download of the EICAR Files from the Official Website.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
In that case You can make your own EICAR File following this steps:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Open a new Notepad.&lt;/li&gt;
&lt;li&gt;Copy &amp;amp; Paste this String in the Notepad (Please be sure that all the caracters are correct):&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Save your new file as &quot;anyName.com&quot; (It is important the .com extension)&lt;/li&gt;
&lt;li&gt;Just at the moment that you save this file, your Anti-Malware Suite should detect it as a threat, if not, you can run a custom scan to verify the effectiveness of your AV.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
More Info:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.eicar.org/86-0-Intended-use.html&quot;&gt;http://www.eicar.org/86-0-Intended-use.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.eicar.org/85-0-Download.html&quot;&gt;http://www.eicar.org/85-0-Download.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/7018723360054407086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/06/test-if-your-anti-malware-suite-is-good.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/7018723360054407086'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/7018723360054407086'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/06/test-if-your-anti-malware-suite-is-good.html' title='Test if your Anti-Malware suite is good enough to Protect your Computer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjBzEHb4ftk9M2KD8yFATnfjp6McXSQvhdoUjB0VUttRjB9mAmdlNTNmiuKc9pSudvyJv3tKqkUZobY21L2stWl7JmMeqjIDgfF_czNaF9AoddkyuS76xphIVi5O6tgBldCVjXz7Lb3TJ/s72-c/EICAR_Test_GL.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-4097310143710545235</id><published>2013-05-03T08:17:00.000-05:00</published><updated>2013-07-24T06:10:29.480-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debugger"/><category scheme="http://www.blogger.com/atom/ns#" term="download"/><category scheme="http://www.blogger.com/atom/ns#" term="malware analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="reverse engineering"/><category scheme="http://www.blogger.com/atom/ns#" term="sandbox"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>[Malwasm] - Offline Debugger for Malware&#39;s Reverse Engineering</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJAYnrjdetB7ThhBC4GNmBt3q-W_XG2rUaUcczUaH6OeIPwHoUPkvhkCMnZtOKSUdlVUF1IMqLTE12V5CQ3ntZX25etXmb9zsoivBBJJcuQtU9JemwvyJsSqO1rigoDmqS2WWBJTnnfsa3/s1600/malwasm_open_short.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJAYnrjdetB7ThhBC4GNmBt3q-W_XG2rUaUcczUaH6OeIPwHoUPkvhkCMnZtOKSUdlVUF1IMqLTE12V5CQ3ntZX25etXmb9zsoivBBJJcuQtU9JemwvyJsSqO1rigoDmqS2WWBJTnnfsa3/s400/malwasm_open_short.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Today I want to share a new tool that I was testing, its name is &quot;Malwasm&quot;, this is a tool based on Cuckoo Sandbox.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Malwasm was designed to help people that do reverse engineering. Malwasm step by step:&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The malware to analyse is executed through Cuckoo Sandbox&lt;/li&gt;
&lt;li&gt;During the execution, malwasm logs all activites of the malware with pintool&lt;/li&gt;
&lt;li&gt;All activities are stored in a database (Postgres)&lt;/li&gt;
&lt;li&gt;A web service is available to visualize and manage the data stored in the database&lt;/li&gt;
&lt;/ul&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Features&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Malwasm provides these features:&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Offline programs debugging&lt;/li&gt;
&lt;li&gt;Possibility to go back or forward in the execution&#39;s time (with a time slide bar)&lt;/li&gt;
&lt;li&gt;States of registers and flags&lt;/li&gt;
&lt;li&gt;Values of the stack/heap/data&lt;/li&gt;
&lt;li&gt;&quot;Following dump&quot; options&lt;/li&gt;
&lt;li&gt;Fully works in the browser&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In Figure 1 you can see how it works with a sample:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg7oVb1sKuu_bGmT5N-7ZjF2cg5QIM0qLnrbBwU8ja5gpNgdzXcxSefFNheGQaSkW1lVBJLX8bBGGglKYSB5R0ygsr-uRhcZ0FI2R-4-GBPWRtDx4ed5QwVzR_6Tn0kPG0TAvtkmX79jp0/s1600/malwasm_decrypt_hackem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg7oVb1sKuu_bGmT5N-7ZjF2cg5QIM0qLnrbBwU8ja5gpNgdzXcxSefFNheGQaSkW1lVBJLX8bBGGglKYSB5R0ygsr-uRhcZ0FI2R-4-GBPWRtDx4ed5QwVzR_6Tn0kPG0TAvtkmX79jp0/s400/malwasm_decrypt_hackem.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1: Malwasm running a Malware Sample&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After all this introduction here are the links:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/malwasm/&quot; target=&quot;_blank&quot;&gt;Project Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/malwasm/downloads/list&quot; target=&quot;_blank&quot;&gt;Download Malwasm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/malwasm/wiki/README&quot; target=&quot;_blank&quot;&gt;Malwasm Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://malwasm.com/&quot; target=&quot;_blank&quot;&gt;Malwasm Web Interface&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Hope You like It! &amp;nbsp;=)</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/4097310143710545235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/05/malwasm-offline-debugger-for-malwares.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4097310143710545235'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4097310143710545235'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/05/malwasm-offline-debugger-for-malwares.html' title='[Malwasm] - Offline Debugger for Malware&#39;s Reverse Engineering'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJAYnrjdetB7ThhBC4GNmBt3q-W_XG2rUaUcczUaH6OeIPwHoUPkvhkCMnZtOKSUdlVUF1IMqLTE12V5CQ3ntZX25etXmb9zsoivBBJJcuQtU9JemwvyJsSqO1rigoDmqS2WWBJTnnfsa3/s72-c/malwasm_open_short.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-4856083983639481325</id><published>2013-04-03T03:01:00.000-05:00</published><updated>2013-07-24T06:10:14.013-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hackem"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp"/><category scheme="http://www.blogger.com/atom/ns#" term="owasp top 10"/><category scheme="http://www.blogger.com/atom/ns#" term="web apps"/><category scheme="http://www.blogger.com/atom/ns#" term="xss"/><title type='text'>OWASP Top 10 - XSS</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIF9QUupB2r-D449vevnbTeyovJglZ9tXmh7OsjJ69CSbaj43oGiGAhjyFpKKOZGI8e0dxlulQx6Z7KQejn2x_oXZyIp3EhFL0q4Zh-jf0kVQubxBaXJg93nLvLCamF0xM-np2LqJ895o9/s1600/XSS_Hackem.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIF9QUupB2r-D449vevnbTeyovJglZ9tXmh7OsjJ69CSbaj43oGiGAhjyFpKKOZGI8e0dxlulQx6Z7KQejn2x_oXZyIp3EhFL0q4Zh-jf0kVQubxBaXJg93nLvLCamF0xM-np2LqJ895o9/s320/XSS_Hackem.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
In this post I want to share one of the most popular attacks that are used in web applications, so let&#39;s start:&lt;br /&gt;
&lt;br /&gt;
&quot;&lt;i&gt;Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites. Cross-site scripting (XSS) attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by your browser and used with that site. These scripts can even rewrite the content of the HTML page.&lt;/i&gt;&quot; - &lt;a href=&quot;https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)&quot; target=&quot;_blank&quot;&gt;OWASP XSS&lt;/a&gt;&amp;nbsp;-&lt;br /&gt;
&lt;br /&gt;
For this practice, I am going to create a scenario that is vulnerable to this attack, first you need to set up a web server that supports PHP, the easiest way is downloading XAMPP (Avaliable for all Platforms).&lt;br /&gt;
&lt;br /&gt;
To test if your web server is up, in a new tab you need to go to: http://localhost/&lt;br /&gt;
&lt;br /&gt;
If all is OK, you will see an image that requests you to select a language, after you choose your language, the main page is shown and it looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIjrWJZhyphenhyphen1TYmVr-H0LiFqBCvq23yZI6vcXQH4wdnyw0s5JVkC-p24JOXcnL2Klo5YXpWT1OPh_m6WeS-LCEbrMtSlxt3-kNo9kHYB7E1nRTJJT0IhQ8rlKq8KVtTfqG7JfkP0CuzwoXQ9/s1600/XAMPP_Linux_Hackem_GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIjrWJZhyphenhyphen1TYmVr-H0LiFqBCvq23yZI6vcXQH4wdnyw0s5JVkC-p24JOXcnL2Klo5YXpWT1OPh_m6WeS-LCEbrMtSlxt3-kNo9kHYB7E1nRTJJT0IhQ8rlKq8KVtTfqG7JfkP0CuzwoXQ9/s400/XAMPP_Linux_Hackem_GL.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 1: XAMPP Started on GNU/Linux&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If you used a web server before, you probably know that you need to move all your website to an specific directory, in this case &quot;htdocs&quot; directory in order to test your files in your browser.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In this exercise, for people that is starting in web development, I am going to create a file &quot;color.php&quot; with a Hello World message, so the code inside this file would be:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;code&gt;&amp;lt;?php&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; echo &#39;Hello World&#39;;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
In order to test this file you need to go to the URL: &lt;a href=&quot;http://localhost/color.php&quot;&gt;http://localhost/color.php&lt;/a&gt;&lt;br /&gt;
And the output of this file should be something similar to Figure 2.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbLzBb2NK1O2670hBTORe7IYKxT2u3-Ie4k6zHLUgHxXeBSHQrdtbH4BxdrgXFjYaqvot0ijtCUofmUfpCQeY90ZeAIcb1mRvSH4HteirZL-4KmqZOB0X-5yu7q88i4vc4W3dKttk6mF7M/s1600/Hello_World_GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbLzBb2NK1O2670hBTORe7IYKxT2u3-Ie4k6zHLUgHxXeBSHQrdtbH4BxdrgXFjYaqvot0ijtCUofmUfpCQeY90ZeAIcb1mRvSH4HteirZL-4KmqZOB0X-5yu7q88i4vc4W3dKttk6mF7M/s320/Hello_World_GL.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 2: Hello World in PHP using XAMPP on GNU/Linux&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Now that all is working, I am going to explain what I am going to do with this color.php file:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Scenario: Suppose you are a web developer, and you create websites for people, in your personal site, you have a short demo where people can choose a background color in the page that is shown to them, this is only to see if the color it is OK for your client. All the code for this file (color.php) it is not included in this post, but you can imagine how it works, hehehe.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Hint 1 (how the requests are sent?): &lt;code&gt;&amp;lt;form method=&quot;post&quot; action=&quot;&quot;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Hint 2 (what is the background color code?): &lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;center&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
After you have finished your color.php file, you can test if it works correctly, for my example please refer to Figure 3, depending of how you coded it, it could be very similar to my file:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsu5eHSFwryl04igRKsX7tqwaJZHY4qqyrdXb5hIG-vetv8WCTTK4WaRlMot46bBaHeoKCCEnv0LjSn5k5lp1wKV36Bls6wc7edxqdgue0NfpjuVhYYvbiL1zVZA5Jn3CullPgXjSqhmZF/s1600/Demo_XSS_GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsu5eHSFwryl04igRKsX7tqwaJZHY4qqyrdXb5hIG-vetv8WCTTK4WaRlMot46bBaHeoKCCEnv0LjSn5k5lp1wKV36Bls6wc7edxqdgue0NfpjuVhYYvbiL1zVZA5Jn3CullPgXjSqhmZF/s400/Demo_XSS_GL.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3: Color.php File working on XAMPP&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;How this web app works?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Really simple, you need to choose your color, then press the button and the background color will change depending of your selection, for example if I choose the yellow color and after that I press the button, my web app will show me the background with that color, see Figure 4.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQZ6fptVlLK7rVmQLh_aEF33aBhV7cJGIRky0Cq3kee_OcQBCWXPUGTpmeIPE_agj1KSnPYN9iFSzGsxgn0o8NBrK8pKYY8K0nVGpj1zacWaCGALJE6rbrPokZ5zyDg7T24RJ9kcdBOEvN/s1600/Demo_XSS_GL_Yellow.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQZ6fptVlLK7rVmQLh_aEF33aBhV7cJGIRky0Cq3kee_OcQBCWXPUGTpmeIPE_agj1KSnPYN9iFSzGsxgn0o8NBrK8pKYY8K0nVGpj1zacWaCGALJE6rbrPokZ5zyDg7T24RJ9kcdBOEvN/s400/Demo_XSS_GL_Yellow.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 4: My Web App with the background color changed&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
So now, how can we exploit this vulnerability (XSS) on the Demo website?, really simple, you need to capture the requests that are sent to the server and modify them.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
For that purpose, you can use a Proxy tool, like OWASP ZAP 2.0, or an Add-on for your favorite browser as you prefer.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After I sent my request (without any modification), what are the changes on the web app?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The background color code: &lt;code&gt;&amp;lt;body bgcolor=&quot;yellow&quot;&amp;gt;&amp;lt;center&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
With this information an attacker can image how this web application works and then how to modify the request to get an XSS, showing an alert message.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
In the Figure 5, you can see a tool that is used to modify the information that is generated by a request, the injection of code is made in the color box, where I wrote javacript code to show an alert message that says &quot;\Hackem Research Group\&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg21UfegkR3nLJwSvJHP7RNPzUMyiMDC_R3a_Oye5rV44Pv43IfW48SdNEGURk438U6CrnIN1G348nO9X5Rd80e1BcKA1jQGjbL5no5Xn8y2DqLxNnwqaJn0NIFkjpuhIokREr27fZ5GahZ/s1600/Modifying_Requests_GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg21UfegkR3nLJwSvJHP7RNPzUMyiMDC_R3a_Oye5rV44Pv43IfW48SdNEGURk438U6CrnIN1G348nO9X5Rd80e1BcKA1jQGjbL5no5Xn8y2DqLxNnwqaJn0NIFkjpuhIokREr27fZ5GahZ/s400/Modifying_Requests_GL.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5: Tool where you can edit the request&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After you finished the edition of the request, you can send it to the server, and the response is a pretty XSS, as shown in Figure 6.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgui0B-cZXMipTmGrkpe8FxcJFnzAUBITPwgxom_iprNBdL8LR-TxrH2NXbNm2pyVPqOX_qTTawQKPo8xBcJVWXubp13O7EcbL3-ZidbQmXpKyxaKzTPbwblmHwg_drB-Gb7aDHacTLiRh6/s1600/XSS_Hackem_Research_Group_GL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgui0B-cZXMipTmGrkpe8FxcJFnzAUBITPwgxom_iprNBdL8LR-TxrH2NXbNm2pyVPqOX_qTTawQKPo8xBcJVWXubp13O7EcbL3-ZidbQmXpKyxaKzTPbwblmHwg_drB-Gb7aDHacTLiRh6/s400/XSS_Hackem_Research_Group_GL.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 6: Alert message shown in the page, means that this web app is really vulnerable...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
This is not only limited to an alert message, you can submit forms, or any kind of element, for example, you can inject code to show a login form, if a banking site is vulnerable to this attack, an malicious programmer can steal login credentials from the original website when people fill the fake form that were injected by XSS.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/4856083983639481325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/04/owasp-top-10-xss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4856083983639481325'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/4856083983639481325'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/04/owasp-top-10-xss.html' title='OWASP Top 10 - XSS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIF9QUupB2r-D449vevnbTeyovJglZ9tXmh7OsjJ69CSbaj43oGiGAhjyFpKKOZGI8e0dxlulQx6Z7KQejn2x_oXZyIp3EhFL0q4Zh-jf0kVQubxBaXJg93nLvLCamF0xM-np2LqJ895o9/s72-c/XSS_Hackem.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-174874363674893263</id><published>2013-03-03T17:42:00.000-05:00</published><updated>2013-07-24T06:10:04.642-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="banker"/><category scheme="http://www.blogger.com/atom/ns#" term="dropper"/><category scheme="http://www.blogger.com/atom/ns#" term="hackem"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="malware analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="reverse engineer"/><category scheme="http://www.blogger.com/atom/ns#" term="trojan"/><title type='text'>Malware Analysis – Trojan Banker</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCbKV5bdsEJfwD5NZF26372yr4O6w9ITcZI6zYEVIN6Yj7gQCe-_ipYEYOkrOyRHN78GlDOfiewXBTzw0vrnxyNFViB5apDrJNMKJFR1hKJaiGlB957yd2ZectZJ2ls16QRkjNG1BHIBeF/s320/trojan_banker.jpg&quot; width=&quot;287&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After we have already prepared our environment for Malware Analysis, let&#39;s start practicing with a simple Trojan Banker, this malware was uploaded to VirusTotal for the first time in 2011-08-22 19:18:47 UTC, and maybe you think, this is a really old sample, but if you are a begginer in this area this could be a good option for getting started.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;First of all, What is a Trojan?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
A trojan (or trojan horse) is a type of malware which appears to perform a desirable function or an innocent action but instead facilitates unauthorized access to the user&#39;s computer system. Trojans do not attempt to inject themselves into other files like a computer virus. Trojan horses may steal information, or harm their host computer systems. Trojans may use drive-by downloads or install via online games or internet-driven applications in order to reach target computers. The term is derived from the Trojan Horse story in Greek mythology because Trojan horses employ a form of &quot;social engineering&quot;, presenting themselves as harmless, useful gifts, in order to persuade victims to install them on their computers.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Well, this kind of malware is usually sent in an email in a compressed file (when the e-mail antivirus can not detect it), but also can be hosted in a compromised server and the victim receives a link to access to it, in this case the malware is a &quot;Postcard&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm5pvrKLK9Crvxi2SEc1fFmCWMPac6ODutmlk-Nq8cepMBpUZ4cKOLZ_E6eWNROfPYKWbiLe_UOh8UYLdAog5UM0Xj7YZG-HgBlQT2p6KARAaFbPDSDVk8A72FHpnCJQ_hl1_08Hq31Xcu/s400/The+Trojan+before+being+executed.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1: The &quot;Postcard&quot; downloaded from a compromised server.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;So, What is the best way to know what does this malware do in my system?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
There are a lot of methodologies, but in this case what I am going to do is to monitor the activity of the malware during its execution, with that I&#39;m gonna see all the changes that it makes to my system.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;26&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJoD1G8RQGEpYFFMdzBDnXoAZtDDW5BXbVKeuXvREsHlf1muxWDCtwa7126aXJSrOvHxKHxt4BtzvAUc1D-i3dvzKQOpSG97DK3VvQ1hChdtpJR1t-g8XJicb5fGnuMUPcafKQP9cnXVtc/s400/Trojan+Process+Tree.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 2: Process Tree of the Trojan Execution&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Oh, this is interesting, as you can see in the Figure 2, when we execute the malware sample, in background a new process is created, which process?, A cmd.exe, we don&#39;t know what does this cmd.exe do, but also we know that after the cmd.exe execution another process is created (firefox.exe).&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now let&#39;s see what the common user observes in his screen after the malware execution.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZJj6TqQrheW4avRLY0L3-puUgac21yYCuLfH4kpJsFFZf-4JQAPQsNxpXxAccCApusC5z5Wa94e9e2lc1p_Sc4ZWvqrLCb9HcExljDZtIZIsTI7AkdB0opuYyZglkF7RwUBH4hY7SSd-/s400/Malware+Execution+Result.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 3: What is shown after the malware execution?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The common user only believes that when he executes the &quot;Postcard&quot;, a new instance of Firefox is created, and a webpage is loaded showing the postcard that was sent to him via e-mail.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
The domain of the webpage that is loaded in Firefox is a real page, with no malicious code inside, so the final user will never know that was infected, because there is no other visible actions made by the trojan.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
But during the execution of this sample some registers of its activity were collected, so please observe, while we execute the malware a &quot;.bat&quot; file were created in the Temp Folder of the User that opened the &quot;Postcard&quot;, and some instructions were written on it.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;25&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNiLPWw1_H_qihIcu5SeGHTmnyDnuZ4O4diW7TO36KNJjV0dwtb3bAQ6m0-PkZ-7ZVRw5Tz7S9uS3iEDPIQdVg9jzq39Qek-u8ZIUj1y77TCkARkax94S_wu0CViw1FACa1WrUkDH-fUPm/s400/Malware+Write+File+in+TMP+Dir.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Figure 4: The Trojan creates a &quot;.bat&quot; file in the Temp Folder&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now that we know where is located the batch file, let&#39;s take a look at the folder and see the instructions written by the trojan.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;107&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDCyIY4ZjOF5S4WsSL5BmrL_2gQAfGnxmNNwKB_n4ebbyRTkv8WSxfOhUk2QCJEavUV-1cMMTo9CT2DcWEPC3L6IC5hAOV0h4jyvXrnCqTY5SxJvM02x6TylC-3fAwMYN7HSn3vlZinqhm/s400/Temp+Dir+With+Batch+File.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 5: The malicious batch file (recovered)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
As shown in Figure 5, &quot;4094.bat&quot; is a batch file generated by our malware sample, the name of the file is random, so in every execution another file is created with a different name, I have to mention that this file was recovered, why recovered?, because the &quot;Postcard&quot; erases the &quot;.bat&quot; file after executing it in a command line.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5eE1HhqvNvmrRwPXu2HsvNlzOhqehyayCFdhNNHyI5hZ4ctvePCFd4RFJQsp0HyFTx-Wm-CpqB0uOkXm7818igjPZth47n43T5GpXBoPv3pSlAV9HnubKwHsENo3_zVQ104tAXbvp0QPf/s400/4094+Batch+File+Content.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 6. Content of the Batch File (Modifies the hosts file and start the default browser with a defined webpage)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After checking the commands that are executed by &quot;cmd.exe&quot; that was started by the Trojan, we can conclude that this is a Trojan Banker, because it modifies the &quot;hosts&quot; file, in order to commit fraud banking, all the people that get infected, when they want to access to their banks (In this case Banks from Chile), they are going to be redirected to a malicious site controlled by the malware creator, in this site the banking credentials can be collected by a phishing webpage.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
During the analysis there weren&#39;t other changes made by the malware in the infected system.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If you want to see more information and the complete report about this sample, please follow this link:&lt;br /&gt;
&lt;a href=&quot;https://www.virustotal.com/en/file/e2f24628d86c41cfaed7f2998477948d3a34afef6b5abffb97b485c55c3773dd/analysis/1364682472/&quot; target=&quot;_blank&quot;&gt;VirusTotal Complete Report&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/174874363674893263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/03/malware-analysis-trojan-banker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/174874363674893263'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/174874363674893263'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/03/malware-analysis-trojan-banker.html' title='Malware Analysis – Trojan Banker'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCbKV5bdsEJfwD5NZF26372yr4O6w9ITcZI6zYEVIN6Yj7gQCe-_ipYEYOkrOyRHN78GlDOfiewXBTzw0vrnxyNFViB5apDrJNMKJFR1hKJaiGlB957yd2ZectZJ2ls16QRkjNG1BHIBeF/s72-c/trojan_banker.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2770464801800569532.post-3171783482472769510</id><published>2013-02-03T16:58:00.000-05:00</published><updated>2013-07-24T06:11:15.440-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cybersecurity for the next generation"/><category scheme="http://www.blogger.com/atom/ns#" term="escuela politecnica nacional"/><category scheme="http://www.blogger.com/atom/ns#" term="getting started"/><category scheme="http://www.blogger.com/atom/ns#" term="hackem"/><category scheme="http://www.blogger.com/atom/ns#" term="kaspersky lab"/><category scheme="http://www.blogger.com/atom/ns#" term="malware"/><category scheme="http://www.blogger.com/atom/ns#" term="malware analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="reverse engineer"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Getting Started on Malware Analysis</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img alt=&quot;Malware Analysis - Getting Started&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCuvE0AakcVKFweW_t3wwRev7TNCCfEAPM7YHCPlznSkAqmlAJ8AaiSQXaqXlCGKMq4V5gSqCBn2EE2lqOPlWNEWbZ9GACA8UI-W7vzoIlcgXi6WuJ5LuEe5uEZV_vAnYDAiy5rg6Dc1XS/s1600/Malware+Analysis.png&quot; title=&quot;Malware Analysis - Getting Started&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Some of my friends asked me how to get started with Malware Analysis, so in this post I want to share the answer, not only for them but for the rest of the world. Malware Analysis for me is some kind a hobby because I think it is funny, really interesting, a good way to help people to solve their problems and finally to fight against Cybercrime.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-size: large;&quot;&gt;How to start?&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
There is no a strict guide to follow, but I recommend to you to follow these phases:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Design your Infrastructure for Malware Analysis&lt;/li&gt;
&lt;li&gt;Prepare a set of tools for Reverse Engineering and Monitoring&lt;/li&gt;
&lt;li&gt;Select a target OS for the infection&lt;/li&gt;
&lt;li&gt;Decide if you want to virtualize the target OS&lt;/li&gt;
&lt;li&gt;Isolate the Environment&lt;/li&gt;
&lt;li&gt;Obtain a Malware Source&lt;/li&gt;
&lt;li&gt;Infect the target OS and Start the Analysis (You can monitor the malware behaviour or&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;you can debug it)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Generate your Report with your conclusions&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;1. Infrastructure Design&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In this step you need to think what do you want to create, for example, this infrastructure could be for personal use only, for an Educational Institution, or even for corporations interested in this topics and the requirements for all this scenarios are not the same so you must know the differences between them.&lt;br /&gt;
&lt;br /&gt;
In this post I am going to show an example of an Infrastructure por a personal use only so we need a physical host and inside it we can install some virtual machines and create virtual networks, as shown in &amp;nbsp;Figure 1.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img alt=&quot;Figure 1. Infrastructure Example for Malware Analysis&quot; border=&quot;0&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNxUAtXHob6fzmGQumbzsTLDUgFWcDGnI-_J_WriSRrJK13Xuv7tibamhcT_A199DcL0cKEx3wJI407MgUe9jzB4pgCI3TL0MzrV_NE9PjgWmP0jBTI0EnYuPKnxywaJqv8KB9GPZndsLS/s400/Infrastructure+Example+-+Galoget+Latorre.jpg&quot; title=&quot;Figure 1. Infrastructure Example for Malware Analysis&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Figure 1. Infrastructure Example for Malware Analysis&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;2. Tools&lt;/span&gt;&lt;br /&gt;
Selecting the tools is one of the most interesting steps, because there are many tools on the Internet, and you are free to select what you want or the one that you like the most, here are some basic tools that you can use to start in this great new world of Malware Analysis.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Behaviour Analysis Tools (e.g Sandboxes, Process Explorer, etc)&lt;/li&gt;
&lt;li&gt;Code Analysis Tools (e.g. Any Hex Editor, Debugger like Ollydbg or gdb)&lt;/li&gt;
&lt;li&gt;Network Traffic Analysis Tools (e.g. Sniffers, Wireshark)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;3. Target OS&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
In this part you need to select one or more Operative Systems that you are going to infect in order to analyse the behaviour of a malware sample, you can choose from various options like:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft Windows XP SP3, Vista, Windows 7, Windows 8&lt;/li&gt;
&lt;li&gt;GNU/Linux Distros (e.g. Ubuntu, Linux Mint, Debian, RedHat, CentOS, etc.)&lt;/li&gt;
&lt;li&gt;Mac OS X (e.g. Tiger, Leopard, Snow Leopard, etc.)&lt;/li&gt;
&lt;li&gt;Unix, BSD and others.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Maybe right now you have this question: &quot;&lt;i&gt;Why do we need to select an specific platform for a malware sample?&lt;/i&gt;&quot;,&lt;/div&gt;
&lt;div&gt;
Well the answer is really simple, because some kinds of malware can only be executed in a specific operative system or architecture, so for this it would be a good idea to have an ISO image of all of those operative systems listed before.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;4. Virtualize, Yes or No?&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
At this point we have to decide in which environment we want to work with, in our real machine or in a virtual machine?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaHrMHf5u3ui32BclUpgTH1x6-99cDOesYEwaxSy9crTY1mBWwNf3FCh0ZnElvU3sjgCAD_hHNOMiJmEqupyzS_68EwUJnnGjrB4TXMF5cC6ksZce8j4E2UppseqDqF-WEaIfAbMVsHLzK/s320/Virtualize,+Yes+or+No+-+Galoget+Latorre.png&quot; width=&quot;304&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Why is a good idea to virtualize?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Is an isolated environment, and it is easier to control the behaviour and activity of our malware samples.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
We can take screenshots od the system, so after finishing the analysis can easily return the environment to its initial state.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Why is NOT a good idea to virtualize?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Malware coders incorporate some functions to detect a virtualized environment, like:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Searching for some drivers&lt;/li&gt;
&lt;li&gt;Searching for some devices&lt;/li&gt;
&lt;li&gt;Searching for some directories&lt;/li&gt;
&lt;li&gt;Searching for some registry entries&lt;/li&gt;
&lt;li&gt;Searching for some installed tools&lt;/li&gt;
&lt;li&gt;Searching for some executing processes&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;5. Isolate the Environment&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
After you decide if you use a virtual machine or your real machine, in both ways you need to isolate the environment in order to control the behaviour of the sample in your OS. This means that we need to know the changes that are made in our hard drive by the malware (creating, replacing or deleting files, changes in our registry, etc.), for that purpose we can use a sandbox.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;6. Malware Samples&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Now you need to focus on where to get malware samples, the most common way to get infected it is visiting cyber cafes, but this is not the most efficient way, so maybe you should search on the Internet for Cracks, Keygens, Patches and then you will find out a lot of samples.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But if you are a member of a Security Corporation (e.g. Antivirus Companies), you can get malware samples from VirusTotal or similar Projects, in future entries I am going to publish two things, 1. Some malware samples recollected by me. 2. A list of sites where you can get some samples, so stay tunned. ;)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;7. Infection and Monitoring&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Now it is the time, we must infect our target system, if the malware sample is an .exe, .bat, .com, etc. We only need to execute it pressing Enter key, but some samples need to exploit some vulnerabilities (e.g. Java, Microsoft Office, Adobe Acrobat Reader, Adobe Flash, etc.) so we need to install the required software for the malware to be executed correctly, after that, you can start monitoring the malware behaviour, this part is going to be explained with more details in a future post.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbgDlUgP6f24DW_JEBYyxGq6y4eV8mKW2u1_mUxNRDP5eIdEP1MaN-SKqzCJ12qZGrvfvMJjWSUHzGl5hgWYo6fH7N-U-PWQtruxWaUvIDj0htmYG_IFSqeSFtP4Bm2BN0P4kZdxueBuht/s400/Adobe,+Flash,+Word+-+Galoget+Latorre.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;8. Report Generation&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
After the analysis, you can build a report with the results of your research about the malware sample, you can list the affected files, the registry entries that were affected, the methods that the sample uses to spread itself, the vulnerabilities that were exploited and more details. In future entries I am going to post an example of a Malware Analysis Report.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;Note: This post was part of my experience in Malware Analysis, if you want to know more about it a Research Paper was presented at &lt;a href=&quot;http://www.kaspersky.com/about/events/educational-events/South_American_Round_2013#tab=tab-4&quot; target=&quot;_blank&quot;&gt;Cybersecurity for the Next Generation South American Round 2013 Conference&lt;/a&gt; organized by Kaspersky Lab and Hackem Research Group, this event was celebrated at National Polytechnic School in Quito, Ecuador.&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://galogetlatorre.blogspot.com/feeds/3171783482472769510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://galogetlatorre.blogspot.com/2013/02/getting-started-on-malware-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3171783482472769510'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/2770464801800569532/posts/default/3171783482472769510'/><link rel='alternate' type='text/html' href='https://galogetlatorre.blogspot.com/2013/02/getting-started-on-malware-analysis.html' title='Getting Started on Malware Analysis'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCuvE0AakcVKFweW_t3wwRev7TNCCfEAPM7YHCPlznSkAqmlAJ8AaiSQXaqXlCGKMq4V5gSqCBn2EE2lqOPlWNEWbZ9GACA8UI-W7vzoIlcgXi6WuJ5LuEe5uEZV_vAnYDAiy5rg6Dc1XS/s72-c/Malware+Analysis.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>