<?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 sha._do on Medium]]></title>
        <description><![CDATA[Stories by sha._do on Medium]]></description>
        <link>https://medium.com/@sha._do?source=rss-c934fcfdfcac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XQg08DRxfD21fu74JKhS3A.jpeg</url>
            <title>Stories by sha._do on Medium</title>
            <link>https://medium.com/@sha._do?source=rss-c934fcfdfcac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 14:47:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sha._do/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[Ensuring Software Integrity: The Role of Application Security]]></title>
            <link>https://medium.com/@sha._do/ensuring-software-integrity-the-role-of-application-security-a937c8045d8f?source=rss-c934fcfdfcac------2</link>
            <guid isPermaLink="false">https://medium.com/p/a937c8045d8f</guid>
            <category><![CDATA[cyber-threat-prevention]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[application-security]]></category>
            <dc:creator><![CDATA[sha._do]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 06:08:22 GMT</pubDate>
            <atom:updated>2024-07-11T06:08:22.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HvMKQMrHz3kZDH6gvxBfbQ.jpeg" /></figure><p>Application Security (AppSec) involves identifying, mitigating, and repairing vulnerabilities in software to prevent unauthorized access, data breaches, and code manipulation. The software development lifecycle (SDLC) is a continuing process that includes all phases, from development to deployment to post-development. Application security’s fundamental objective is to prevent theft or modification of sensitive data and application code. This involves putting appropriate security measures in operation during the design and development stages of the application and keeping strong protection in effect throughout all phases of the application’s deployment. The methods vary from software-based defenses like application firewalls to hardware protections like routers. To find and fix vulnerabilities in the source code, frequent security testing, code reviews, and the usage of analytic tools are also necessary.</p><blockquote><strong>Importance of Application Security</strong></blockquote><p>Application security is paramount for organizations handling sensitive customer data, as it’s essential to thwart data breaches and minimize the attack surface. A robust application security program helps mitigate risks by addressing software vulnerabilities that could be exploited by attackers seeking valuable data like customer details, trade secrets, or employee information. In the modern cloud-based environment where data traverses&#39; multiple networks and connects to external servers, it’s critical to not only monitor network security but also to protect individual applications from increasing hacker attacks. Proactive application security testing and measures are vital, providing organizations with the advantage of preemptively resolving potential vulnerabilities to safeguard operations and customer trust.</p><p>Application security flaws can have significant consequences such as permanent or temporary business closures, monetary losses, identity theft, and damage to the company. Acquiring the appropriate application security solutions is crucial to safeguarding businesses and their clients from any possible risk.</p><blockquote><strong>Types of Application Security</strong></blockquote><p>To sustain and optimize the overall security of application, it provides principal categories that allow for simplified threat and vulnerability protection. Including:</p><p>● Authentication: Verifying the identification of users who use the application to guarantee that only authorized persons obtain access. This may include multi-factor authentication, which combines passwords, fingerprints, and physical tokens.</p><p>● Authorization: Allowing users to access specified features depending on their recognized identity, while guaranteeing access control via identity access management.</p><p>● Encryption: Protecting sensitive data during transmission or storage within the application to prevent unauthorized access or interruption.</p><p>● Logging: preserving log files that record user interactions aids to track application activity and discover security breaches.</p><p>● Testing: Validating the effectiveness of security measures using a variety of testing approaches, including static code analysis and dynamic scanning.</p><blockquote><strong>Top Security Threats on the Web</strong></blockquote><p>According to OWASP, the top ten web application security risks include:</p><p>1. Broken Access Control</p><p>2. Cryptographic Failures</p><p>3. Injection</p><p>4. Insecure Design</p><p>5. Security Misconfiguration</p><p>6. Vulnerable and Outdated Components</p><p>7. Identification and Authentication Failures</p><p>8. Software and Data Integrity Failures</p><p>9. Security Logging and Monitoring Failures</p><p>10. Server-side Request Forgery (SSRF)</p><blockquote><strong>Application Security Process</strong></blockquote><p>The application security process is a comprehensive approach that encompasses various critical steps to secure applications effectively. It begins with Risk Assessment and Planning, which identifies possible security issues and develops a security strategy to mitigate them. This is followed by Secure Design and Development, which entails building security into the application’s design and coding methods from the starting point. Code review and testing are then performed to identify and address security flaws in the application’s code. The second phase, Security Testing and Evaluation, assesses the efficiency of the security measures and identifies any remaining vulnerabilities using methods such as red teaming, penetration testing, and vulnerability scanning. Finally, Deployment and Monitoring guarantees that security is maintained after deployment by continuous monitoring and the timely delivery of security updates and patches.</p><blockquote><strong>Application Security Testing (AST)</strong></blockquote><p>● Static Application Security Testing (SAST): Static Application Security Testing (SAST) is a highly automated, white-box testing approach that is essential for safe software development. It examines an application’s source code, bytecode, or binary code at its initial stages of the Software Development Lifecycle (SDLC). This proactive analysis is essential for detecting and resolving vulnerabilities early on, improving the application’s security posture. SAST can identify a wide range of security concerns, including injection flaws, cross-site scripting (XSS), insecure data management, and other typical vulnerabilities identified in the OWASP Top 10 and SANS Top 25. By illustrating potential threats before the application is deployed, SAST allows developers to fix issues, considerably improving the application’s security before it is released to the public.</p><p>● Dynamic Application Security Testing (DAST) : Dynamic Application Security Testing (DAST) is a testing approach that involves simulating cyber-attacks on a web application to identify flaws. After the simulated attacks, a DAST scanner analyzes its findings to identify any potential vulnerabilities. DAST is accessible in two formats: manual and automated. Manual DAST uses human skills to identify vulnerabilities that automatic scanners may miss, whereas automated DAST employs tools to methodically evaluate the code. DAST, for example, may enter a series of numbers to detect a SQL injection vulnerability, therefore evaluating the application’s response to possible SQL code exploitation. DAST systems are meant to reproduce various attacks, inspect endpoints, and assure the security of sensitive data, with automated DAST tools capable of identifying adverse outcomes that could impact the user experience.</p><p>● Interactive Application Security Testing (IAST) : IAST is a dynamic approach for analyzing applications for vulnerabilities while in use, integrating efficiently with IDEs enabling real-time security analysis throughout development. At its basis, IAST uses sensor modules within application code to monitor activity and report on vulnerabilities such as hardcoded API keys, unsanitized inputs, and unencrypted connections. As IAST’s significance rises, it stands out for its ability to rapidly uncover vulnerabilities that even advanced technologies may fail to recognize. Unlike Static Application Security Testing, which just analyzes code, IAST combines the depth of SAST with the practicality of Dynamic Application Security Testing through analyzing run code and identifying the exact location of vulnerabilities. When considering an IAST vendor, it’s important to examine features that enable cost effectiveness, CI/CD integration, and scalability.</p><p>● Runtime Application Self-Protection (RASP) : Runtime Application Self-Protection (RASP) is a security solution that integrates protective features into software applications to defend against attacks in real time. Unlike traditional security methods that protect the network or endpoints, RASP focuses on the application, using integrated sensors and contextual insights to monitor and respond to threats during runtime. It successfully manages the application, responding to security events by resolving concerns without changing the code. This internal safeguarding mechanism allows RASP to quickly neutralize risks, such as SQL injection attacks, by preventing malicious commands from impacting the application’s database and therefore protecting sensitive data from possible breaches. Essentially, RASP functions as an internal network device, offering a strong security layer within this application.</p><p>● Software Composition Analysis (SCA) : Software Composition Analysis (SCA) is an important approach for analyzing the many components of an application to discover and manage vulnerabilities. In today’s software development, which frequently integrates unique code with open-source and third-party components, SCA is essential for maintaining a strong security posture in the context of increasingly sophisticated cyber threats. SCA tools scan the source code, do a vulnerability analysis, and provide a Software Bill of Materials (SBOM) that lists the components and licensing. These tools also identify vulnerable libraries, evaluate open-source dependencies, and cross-reference results with vulnerability databases to flag serious vulnerabilities. Offering remedial assistance, SCA tools assist enterprises in establishing and maintaining a complete security and compliance baseline, assuring continuing licensing compliance and consistent application security as development develops.</p><p>● Web Application Firewalls (WAF) : WAFs serves as essential barrier of protection for websites, mobile applications, and APIs, continuously monitoring, filtering, and blocking malicious traffic. WAFs, which are designed to identify and mitigate common web traffic vulnerabilities, are essential for online organizations that handle sensitive data. They provide deployment alternatives such as network-based, host-based, and cloud-based solutions. They work on two fronts: inbound protection scans external traffic for risks, while outbound protection seeks to prevent data breaches. WAFs respond to the evolving landscape of cyber threats by implementing proactive security rules that keep them effective against a wide range of attacks, including zero-day vulnerabilities, bots, and malware. By keeping up-to-date security policies, WAFs may efficiently alter their defenses to shield web applications from both present and upcoming threats.</p><p>Application security is a multifaceted and continuous process that is critical to securing sensitive data and retaining consumer confidence. Organizations may protect their apps from growing cyber threats and vulnerabilities by establishing comprehensive security measures, using multiple testing methods, and focusing on specific areas like web and API security.</p><p>Reference: <a href="https://www.ibm.com/topics/application-security">What is application security? | IBM</a> , <a href="https://snyk.io/learn/application-security/testing/">Application Security Testing (AST) — Types &amp; Tools | Snyk</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a937c8045d8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The following Writeup is for the HACKTHEBOX Machine Surveillance.]]></title>
            <link>https://medium.com/@sha._do/the-following-writeup-is-for-the-hackthebox-machine-surveillance-700e38dade77?source=rss-c934fcfdfcac------2</link>
            <guid isPermaLink="false">https://medium.com/p/700e38dade77</guid>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[sha._do]]></dc:creator>
            <pubDate>Mon, 19 Feb 2024 04:54:51 GMT</pubDate>
            <atom:updated>2024-02-19T04:54:51.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxPle229BM1-sEJVXY8LZQ.png" /></figure><p>The following Writeup is for the HACKTHEBOX Machine Surveillance. It explains the TTP, and additional resources used to complete the challenge.</p><h3>Reconnaissance</h3><p>Initially we conduct Nmap scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*62v-ZkvMHRzZ5GsMzkenpQ.png" /></figure><p>http port is in an open state, so let’s check if we can access the webpage in a web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwLss8ZQ7LuxqGbkErDQQQ.png" /></figure><p>Adding the IP address and DNS name to the <strong>/etc/hosts</strong> file may help resolve issues if a webpage is having trouble locating the site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*qy5Jqai87MPp4SmHZk_d6A.png" /></figure><p>UP!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwixYeW21bRbMfK0ubfC2Q.png" /></figure><p>Also Conducted another scan using whatweb</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcDnfQe8GsSFtMub9SBrTg.png" /></figure><p>Notable observation is Powered By Craft CMS.</p><h3>Directory Enumeration</h3><p>Since the web page is accessible, let’s find out directories which were also accessible. GoBuster is one of the popular tools which used for directory busting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*zHiVvB5r4ZC9W96I1wLn0w.png" /></figure><p>Got directory of admin page which redirect to login in Craft CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxQmsEySfDw-3tiPWwbOEg.png" /></figure><p>The source code of surveillance.htb/index.php reveals the version of the Craft CMS which will be initial foothold for the vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NbUC8KTUDm3fGrRYj-EFKw.png" /></figure><p>Researched the version online and discovered a POC (Proof Of Concept) to exploit using RCE (Remote Code Execution)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*ASojq9O_EJgLlLrMStbCtA.png" /></figure><p><a href="https://gist.github.com/to016/b796ca3275fa11b5ab9594b1522f7226">CVE-2023–41892 (Craft CMS Remote Code Execution) — POC (github.com)</a></p><p>Execute the python script against surveillance page to obtain the shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*dxY84hWZmFcJ-BZQtL8foQ.png" /></figure><p>We’ve gained access to the shell; let’s determine which user accounts have the Bash shell as their default login shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*d6TGSFZuFEyO9yUraXhfiQ.png" /></figure><p>Since this is initial access, we need to obtain the shell for bash commands.</p><p>Researched about reverse shell techniques and discovered some useful Linear commands.</p><p><a href="https://swisskyrepo.github.io/InternalAllTheThings/cheatsheets/shell-reverse-cheatsheet/#summary">Reverse Shell Cheat Sheet — Internal All The Things (swisskyrepo.github.io)</a></p><p>Crafted the following Linear which is under Netcat OpenBsd.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*t5A7Ltw4KR-R8xyjNynkAQ.png" /></figure><p>The full operational shell has been obtained successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*T61THoCQDw6LpGaDr_kxVQ.png" /></figure><p>Some searched around and discovered an SQL.zip file located beneath the webpage title.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*E4DplQxpWck4G3CL-31E-w.png" /></figure><p>After that, performed a wget command to extract the file in local system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ELgY67zc_AdcsQswVXMu_g.png" /></figure><p>The file was unzipped, and its contents were revealed to inspect specific credentials. Among them, a user named Matthew was identified, along with a hashed password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VDpv3_bYkDh8wkT0Cgj-lw.png" /></figure><p>I used Hash-Identifier to identify the type of hash used in Matthew’s password. It appears to be potentially generated using SHA-256.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*-qTYDm-whI93ZHunyxS5oQ.png" /></figure><p>added it to a text file and used Hashcat to attempt the password cracking process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*7TPaRzrU7ZOmJWYNtGR1DQ.png" /></figure><p>The password has been cracked successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywIqWHfU0ZYBvIL9BfhEsw.png" /></figure><p>Following with the identification of password for the specified account, Tried ssh login and it worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*MkL4hNX3E9Tf13OXHFhA5Q.png" /></figure><p>First Flag been obtained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*yhmy4LutNgXWazTgOtUQ5Q.png" /></figure><p>I executed LinPEAS to search for possible paths to escalate privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HXEQcKFD3bjVVse3MKoOEA.png" /></figure><p>We got shell access to matthew. The rest of the users were zoneminder and root. Upon going through the result of LinPEAS found some interesting stuffs under the user zoneminder.</p><p>password related to user “zoneminder.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*GmwdwlKjbrB_n6NqfVCFRQ.png" /></figure><p>some configs to user “zoneminder”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*E4WcAEA52WVLCISMhdF8Ig.png" /></figure><p>Further analysis, found the user “zoneminder” related to monitoring software via CCTV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*zXa6ysWLfxFKEbF76hyC2Q.png" /></figure><p>Also, it’s stored locally which is a foothold for ssh using port forwarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*Onn5bvgc5cu6JAhow0jlsA.png" /></figure><p>After logging in, check if the content can be displayed locally. You should see something similar to this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*POEtX7hI7SNrPYBw6Wn-qg.png" /></figure><p>Preferable to use Metasploit Framework since it may contain any exploitation to “Zoneminder”. Upon searching found related modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLWws09IsLc3-b07dq8Rjw.png" /></figure><p>Let’s craft the steps to check whether “Zoneminder” is exploitable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*5Fnus6NM-YI1Qz8SA4mimg.png" /></figure><p>Yes and we got the initial access. sudo -l command can be used to list the privileges or permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*w-fBXZsZoFImx78x_usBsw.png" /></figure><p>The shell seems unstable, so spawning a stable shell using python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*SHCKDhFq3J5xU8L-KZjtsg.png" /></figure><p>Upon further analysis and to discover what’s in the directory, files written in PL file contain source code written in Perl, a scripting language compiled and run using a Perl interpreter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*F_KjnPSPwrAcoTrbv0zDbw.png" /></figure><p>After a few minutes of searching online, I found a method to escalate privileges to root using the PL file zmupdate.pl.</p><p><a href="https://manpages.ubuntu.com/manpages/kinetic/man1/zmupdate.pl.1.html">Ubuntu Manpage: zmupdate.pl — check and upgrade ZoneMinder database</a></p><p>In the “user” parameter within zmupdate.pl, you can input a file directory instead of a user and attach the password we found earlier. We’ll utilize this to execute a reverse shell script employing local user privileges (remember to convert the shell script file into executable using chmod 700).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*N5GDeoMF1cdHSA6jH8wMqw.png" /></figure><p>busybox is used to access the netcat command itself, without it the script will not run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*UyboNoDiklS5jKudXmtwHw.png" /></figure><p>Let’s execute the privilege escalation cmd in user “zonminder” and netcat to listen for incoming connections in our local system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*hS3TSb3LL1ALDZ12hKSn2Q.png" /></figure><p>Successfully got Root Access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*xFvO77a5UOl9lHkupywRmQ.png" /></figure><p>Credit to <a href="https://medium.com/u/a9c7cd96043b">Van Emerson Francisco</a> &amp; <a href="https://github.com/zhsh9">zhsh9 (github.com )</a>for the discovery!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=700e38dade77" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>