11/26/2024 | Press release | Distributed by Public on 11/26/2024 08:35
An "Evil Proxy" is a malicious proxy server used by attackers to intercept and change the communication between a client and a legitimate server. It is also known as Phishing-as-a-Service (PhaaS), where the attackers attempt to deceive individuals into providing sensitive information such as usernames, passwords, and credit card numbers.
An Evil Proxy can be particularly dangerous as it uses Reverse Proxy and Cookie Injection methods to bypass two-factor from major vendors like GitHub, Apple, Okta, Microsoft and Google.
Evil Proxies operate on the Reverse Proxy principle, where the attacker leads the victim to click a malicious link that appears to look like a legitimate login page.
When the victim attempts to log in, the Evil Proxy forwards the authentication request to the actual service, simultaneously capturing the two-factor authentication (2FA) credentials through Cookie Injection.
To increase their chances of success, the attackers impersonate trusted services and apps, such as Concur Solutions, DocuSign, and Adobe.
Figure 1
The phishing URL including DocuSign is undetected by Virus Total
Here's another example of how the the Email Gateway security tool is bypassed using the "DocuSign" application as the email sender.
Figure 2
Email Security Gateway determined the phishing URL as clean
This allows attackers to utilize the captured cookie, granting them unauthorized access to the victim's account.
Follow the sequence below to see the code that can be used to launch an attack and how users are tricked into sharing their credentials:
Figure 3
Use your identity management logs to identify and detect phishing attempts. Here are some explanations of Okta messages that help detect and identify potential threats:
Event Properties:
Cloud Platform: Okta
okta.outcome.reason: "FastPass declined phishing attempt"
Event Properties:
Cloud Platform: Okta
Event Name: ("policy.evaluate_sign_on" OR "user.session.start")
Error Outcome: "Success"
Threshold: Results aggregated by okta.debug_context.debugData.dtHash >= 2
Event Properties:
Cloud Platform: Okta
Event Name: system.operation.rate_limit.violation
Error Message: Too many OTP verification attempts for Enter a code factor
Figure 4
Okta is usually successful in detecting and blocking phishing attempts
Web Traffic Logs It is also important to monitor your organization's network traffic logs to identify and analyze authentication requests. Detect where the domain of the request differs from the domain specified in the iss (issuer) parameter to identify potential security issues.
Example of two consecutive requests:
First Request:
okta.loginmt.com/app/userhome?iss=https://okta.loginmt.com&session_hint=AUTHENTICATED
This request seems to be legitimate, as the domain of the request and the domain specified in the iss are the same.
Second Request:
malicious-okta.com/app/userhome?iss=https://okta.com&session_hint=AUTHENTICATED
In the second request, malicious-okta.com- is not equal to okta.combecause they are entirely different domains. Despite the former containing "okta" in its name, it could be used for malicious purposes.
Here is a simple Python script to validate that the domain in the request is the same as the domain specified in the iss (issuer) parameter:
import re # Example URLs to test urls = [ "https://okta.loginmt.com/app/userhome?iss=https://okta.loginmt.com&session_hint=AUTHENTICATED", # Legitimate "https://malicious-okta.com/app/userhome?iss=https://okta.com&session_hint=AUTHENTICATED", # Potential Malicious "https://secure-okta.io/app/userhome?iss=https://secure-okta.io&session_hint=AUTHENTICATED", # Legitimate "https://fake-okta.net/app/userhome?iss=https://okta.com&session_hint=AUTHENTICATED" # Potential Malicious ] # Improved regex to extract host and iss domains pattern = r"^(?:https?:\/\/)?([a-zA-Z0-9.-]+)(?:\/|$).*?[&?]iss=https?:\/\/([a-zA-Z0-9.-]+)" print("Malicious URLs:") for url in urls: match = re.search(pattern, url) if match: host_domain = match.group(1) iss_domain = match.group(2) # Flag malicious if host and iss domains don't match if host_domain != iss_domain: print(f"- {url} (Host: {host_domain}, Iss: {iss_domain})")
Another method in mitigating potential threats is to utilize Threat Intelligence sources in identifying malicious actors and assess risks associated with suspicious domains. It also investigates known domains linked to harmful activities and searches for domains that are similar to your organization URL.
Integrating Indicators of Compromise (IOCs) into various systems, such as SIEM, SOAR, Email gateway, EDR, within an organization's security infrastructure is crucial for enhancing threat detection and enabling fast response capabilities.
Figure 5
Flow of how attacks that initially appear clean are later identified as malicious
The Email Gateway and Web Traffic monitoring systems initially flagged the attack domain as "clean," meaning they did not detect it as a threat. The Identity Management system, however, identified suspicious activity related to this domain and partially blocked it based on the detected anomaly.
Using this information, the SOAR system can dynamically classify the domain as "malicious" and take action to block it fully, enhancing the security response.
There are a number of steps that can be taken to protect against potential attacks through proper configuration of Microsoft Office:
Educating employees about security risks, including phishing and smishing tactics can go a long way towards prevention of successful attacks.Regular training sessions, gamified events and simulated attacks can all significantly reduce the risk of compromising your organization..
The concept here is that users, processes, and systems should only be granted the minimum levels of access necessary to perform their tasks. Benefits of this approach include:
By limiting permissions, this principle helps minimize the potential damage that can occur if a system is compromised.
Threat actors are continually looking for new methods to steal legitimate user credentials and gain entry to user accounts, aiming to access sensitive information. New methods and techniques are constantly being adapted to counter the latest security techniques and methodologies, such as multi-factor authentication.
As we have seen, there is no protective scheme, not even MFA that acts as a silver bullet against all possible threats. That's why it's probably a good idea to take a tour or set up a demo to see how JFrog's Advanced Security solutions can protect your organizations from potential attacks today and in the future.