❌

Reading view

There are new articles available, click to refresh the page.

Filter generation in practice: from algorithms to LLMs

A modern organization protects its information systems with a whole suite of technologies that generate thousands of security alerts every day. Looking at these alerts in bulk, you’ll see that a significant share are false positives. Ideally, these alerts would be filtered out automatically so that analysts could focus on the ones that may point to a real incident. However, writing filters is a time-consuming task in itself. To create a correct filter, an analyst needs to:

  • Review the logs
  • Identify the source of the activity
  • Define filtering boundaries
  • Choose filtering criteria
  • Write a rule
  • Check that the filter is robust

This post looks at how filter creation itself can be automated to reduce analyst workload.

Filter validity criteria

In the context of security alerts, a filter is a combination of event field values that marks a detection as a false positive and not worth the analyst’s attention. Filters can be generated for any combination of event fields, but not every combination yields a valid filter. That’s why we need to define validity criteria: conditions showing that a specific filter actually removes noise and doesn’t suppress useful alerts.

Detection rules in security systems typically contain a set of conditions, and each of them can generate an alert. A specific event triggers a given fragment of a detection rule. The set of events that a given fragment responds to is what we’ll call its context. A good filter should cover the entire context where possible, without going beyond it. Filters that are too broad or too narrow are useless. For example, a filter based solely on PowerShell would exclude too many events, including some that deserve the analyst’s attention. Most of the filtered events would also be unrelated to the rule in question. A filter on a specific ID, on the other hand, would cover only one event, which may never recur.

Problems in filter generation

We can run into a number of problems when creating filters. First, events often contain an excessive number of fields (around 400 on average), and most of them aren’t needed for filtering. At the same time, generating and ranking combinations of these fields is also fairly resource-intensive. So, the first step is to discard the irrelevant fields and keep only those worth using in the filter. For example, out of 400 fields in an event, four may be enough for filtering.

Another problem is string normalization. Field values (for example, the path to the same application on different systems) can vary depending on system settings, user folder names, and so on. For a filter to account for all these variations, the strings must be normalized. For file paths, in particular, you can replace the drive letter and user folders with standard environment variables and convert all paths to a single case.

Finally, if a filter completely mirrors the query of a detection rule, it effectively disables that rule. To fix this, remove the event fields used in the detection rule from the filter. For example, if a rule triggers on a file path, there are two ways to filter out unwanted alerts:

  • In the filter, use fields other than the file path.
  • Use a part of the file path that the rule doesn’t use. For example, for the rule file_path: ".../something.exe", you can set up a filter that excludes events with the user/unique_files/ directory in the file path.

Filtering security alerts with an algorithm

Given the problems described above, automatically generating filters for security alerts should consist of the following steps:

  1. An analyst receives a security alert that they assess as a false positive and uses the filter generator.
  2. The generator takes the 400-field event from the alert, along with the rule that triggered on it, and determines the context.
  3. The generator selects the fields that are relevant to the filter.
  4. The generator normalizes the strings.
  5. The generator builds different combinations of the selected fields. To do this, we applied the FP-Growth (frequent pattern growth) algorithm to the context determined earlier. FP Growth builds a tree of frequently occurring items (fields) from a dataset (in our case, the context) and discards items that aren’t frequent enough. This reduces the number of combinations to check, which lowers the cost of finding the most relevant ones.
  6. The generator ranks the resulting combinations and offers the analyst the top three to choose from.

For example, consider an event described by the following JSON:

After generating and ranking the combinations, we got three filters based on file paths:

  • processcmdline:("nodejs\\node.exe" AND "*****\\appdata\\roaming\\npm\/node_modules\/pi-coding-agent\/dist\/cli.js")
  • file_path:"*****/.pi\\agent\\bin\\fd.exe"
  • processcmdline: "programfiles\\nodejs\\node.exe"

The last filter turned out to be too broad, but the analyst marked the other two as valid.

Pros and cons of the algorithmic approach

The algorithmic approach to filter generation has several advantages. First, it’s simple and deterministic: the same alert always produces the same result. Second, it’s interpretable, meaning we can see why a given combination ranked near the top of the list and why a particular field didn’t make it into the list of candidate fields at all. Third, the stages of the process are independent of each other, so individual steps can be improved and tuned without the risk of breaking the algorithm elsewhere. Finally, it has no external dependencies or models, which makes it easy to deploy in any customer environment.

However, it also has drawbacks. The first is its dependence on context. If there’s no context for some reason — for example, the rule’s first-ever trigger — a filter can’t be created. The second problem is string normalization. There’s a high chance of running into atypical cases that the normalization rules don’t cover. Often such cases can’t be described correctly at all, because they contradict each other.

These problems can be solved with large language models (LLMs). When an LLM generates the filters, no context is needed, because the LLM doesn’t iterate over or rank combinations. The LLM also takes a more flexible approach to string normalization, including non-standard cases. That said, an LLM doesn’t have to be involved at every stage of the generation process. We decided to keep the algorithmic solution where it works well. For example, a simple algorithm selects suitable fields without errors, so we didn’t move this stage to the model.

Filter generation with an LLM

The LLM-based filter generation looks like this:

The input is still an alert containing an event with 400 fields, plus the rule that triggered on that event. Then an algorithm selects the most suitable fields for the filter. Next, the LLM processes the input — the event, the selected fields, and the detection rule — and generates three filter options along with an explanation for them. The explanation helps the analyst understand why these particular filters were suggested and make an informed choice.

Consider the following event in JSON format:

The LLM suggested three filter options that all contain the same command line fragment:

  • file_path: "\\WindowsPowerShell\\powershell.exe" AND filecmdline: "Get-VM -Name kafka\*"
  • filecmdline: "Get-VM -Name kafka\*"
  • filecmdline: "kafka*"

As in the previous example, two of the three output filters were valid. The last one was too broad to be usable. The analyst chose the first filter with minor edits:

file_path: "powershell.exe" AND filecmdline: "Get-VM -Name kafka\*"

Pros and cons of generating filters with an LLM

Using an LLM solved the problems of purely algorithmic filter generation: dependence on context and errors in string normalization. However, the single-request approach had its own drawbacks. First, it had no output validation. The LLM returned filters as-is, with no syntax check and no way to correct errors. Second, unlike in the algorithmic version, all filter generation tasks were handled by a single system prompt. As a result, a minor fix in one place could break the logic in another.

Using multiple AI agents

To address the problems of generating filters with a single model and a single system prompt, we tried distributing the tasks across different LLM agents. In this version, we brought in agents as early as the stage of selecting relevant fields. The chain includes four agents in total:

  • Selector: selects the relevant fields.
  • Generator: generates filters.
  • Validator: evaluates the generated filters. If the filters are found to be invalid, it returns the task to the generator. If the selected fields are found to be irrelevant, it starts a new field selection cycle. If the filters pass validation, or the limit on regeneration attempts is reached, the valid filters (or the best ones available) are passed to the analyst.
  • Commentator: analyzes the output filters and explains which field values were used and why.

For the following JSON event, the agents produce three valid filters based on the file path.

The filters differ in the additional parameters that support the detection:

  • file_path:"sysvol\\domain\\scripts\\logon.bat"
  • file_path:"sysvol\\domain\\scripts\\logon.bat" AND file_md5:"0x7..6E"
  • autorun_entry: "Group Policy\\State" AND file_path: "SYSVOL\\domain\\scripts\\logon.bat"

Pros and cons of the agent-based approach

LLM agents give us a system that can validate and correct filters. Its modular architecture also lets us tune and improve different stages of generation independently. However, this approach makes more LLM calls than the previous ones, so the system is slower. It also depends on access to a model, which may not be available in the organization’s isolated environment.

Evaluating the filter generation system

To evaluate how well the filter generation system works, we use two main metrics:

  • Approval rate. For each security alert, the system suggests three filters. If the analyst selects at least one of them, we count the generation as successful. For example, in the case below, the approval rate is 2/3.
  • False positive reduction rate (FP drop). This metric shows how much a filter helps reduce the number of false positives. It can only be measured over time, because we need to compare the number of false positive alerts received during a set period before and after the filter is deployed.

Below is a comparison of the three filter generation approaches by these metrics:

As the results show, LLMs significantly improve the efficiency of filter generation. At the same time, the LLM agentless and agent-based approaches perform almost identically. So we chose the simpler and faster option: an LLM with a single system prompt. As a result, we cut false positives by 99%, increased the number of filters generated per day by 28%, and made analysts’ alert handling 17% more efficient.

Takeaways

Practice has shown that filter generation can be automated effectively. We’ve looked at several options for automatically generating filters for false-positive security alerts: a purely algorithmic approach, an LLM-based approach, and an approach built on a group of LLM agents. All of them can generate valid filters and make the analyst’s work much easier, but each has its own pros and cons.

The algorithmic approach scored lower on the evaluation metrics, but in two-thirds of cases, it still produces filters that satisfy the analyst. It works especially well when there’s already a set of similar events to filter out, meaning enough context has accumulated. The algorithmic generator can also be deployed in any environment. Both standalone LLM and multi-agent LLM approaches show high accuracy, and their results differ only slightly, so the slower agent-based approach looks excessive at this stage. If an LLM is available, the best option appears to be a single model that handles several stages of the generation cycle.

Password Cracking: Stealing Credentials with PCredz

PCredz is a network credential analysis tool that examines packet captures to identify potentially exposed authentication data. Security professionals can use it to investigate insecure protocols, understand credential exposure, and identify weaknesses in network authentication.

Welcome back, fellow cybersecurity enthusiasts!

In this tutorial, we will explore PCredz, a tool used for network traffic analysis, credential exposure assessment, PCAP analysis, and authentication security testing. Rather than manually inspecting every packet, PCredz can help identify supported authentication artifacts within captured network traffic.

Understanding how credentials travel across a network is an important part of ethical hacking, penetration testing, incident response, and defensive cybersecurity. Analyzing these artifacts can help organizations discover legacy authentication protocols and reduce the risk of credential theft.

Official GitHub repository: PCredz on GitHub

1. What Is PCredz?

PCredz is an open-source tool designed to extract supported credential artifacts and other sensitive information from network packet captures. It is useful when examining traffic generated by older protocols or authentication mechanisms that may expose sensitive information.

Depending on the protocol and the available packet data, PCredz can identify artifacts associated with authentication mechanisms such as NTLM and Kerberos, as well as certain HTTP authentication methods and credentials associated with services such as FTP, POP, SMTP, and IMAP.

It may also identify other sensitive data patterns, including certain payment-card number patterns and SNMP community strings. Detection depends on the capture contents, protocol support, and tool version.

A critical distinction is that finding an authentication artifact does not automatically mean that a valid, reusable password has been recovered. Some protocols expose hashes, challenge-response exchanges, or other material that requires further analysis.

2. Key Features and Capabilities of PCredz

Network Packet Capture Analysis

PCredz can process supported packet capture files, making it useful for investigating previously recorded traffic. PCAP files may contain evidence of insecure authentication, accidental data exposure, or legacy protocols that should be reviewed.

Authentication Artifact Identification

The tool can help identify supported authentication-related data, including certain NTLM and Kerberos artifacts. These findings can support a wider security assessment of authentication configurations and network exposure.

Multiple Protocols

Depending on the captured traffic and implementation, the tool can inspect authentication exchanges associated with several common network services. Support for IPv4 and IPv6 traffic also makes it relevant to mixed network environments.

Structured Output

PCredz can write discovered artifacts to output files, including a credential dump file. Structured output helps security analysts review findings, document evidence, and investigate potential exposure without manually collecting every result.

3. When Would You Use PCredz?

PCredz is relevant to both offensive security assessments and defensive network investigations when its use is explicitly authorized.

Internal Security Assessments

Security teams can analyze approved packet captures to determine whether legacy services or authentication configurations expose sensitive data. The results can help prioritize the migration of insecure services and the improvement of network segmentation.

Incident Response

During an investigation, analysts may inspect existing packet captures for authentication artifacts associated with suspicious activity. Any discovered credentials or hashes should be handled as sensitive evidence and stored securely.

Legacy Protocol Audits

Older business environments may still contain services that use outdated authentication mechanisms or transmit information without adequate protection. PCredz can help identify evidence of these weaknesses when relevant traffic is available.

Security Training and Research

In a controlled lab, PCredz can demonstrate why encrypted transport, modern authentication, and strong network security policies matter. Students can compare insecure and secure authentication configurations using traffic generated specifically for the exercise.

Important: Only inspect traffic that you own or are explicitly authorized to analyze. Captured network traffic can contain personal information, session tokens, credentials, and other confidential data.

4. Installing PCredz on Linux

PCredz is available through its official GitHub repository. Before installation, review the repository's current instructions and dependencies. The commands below illustrate a basic Linux setup; exact requirements may vary with the current version of the project and your distribution.

Step 1: Install the Required Packages

On Debian-based systems, such as Kali Linux, update the package index and install Python virtual environment support and relevant development dependencies.

sudo apt update
sudo apt install python3 python3-venv python3-pip
sudo apt install libpcap-dev file git

Step 2: Clone the Official Repository

git clone https://github.com/lgandx/pcredz.git
cd pcredz

Step 3: Create a Virtual Environment

A Python virtual environment keeps project dependencies separate from system-wide Python packages. This is particularly useful on recent Kali Linux and Debian releases, where system Python environments are managed by the operating system.

python3 -m venv pcredz-env
source pcredz-env/bin/activate

Step 4: Review and Install Dependencies

Check the repository for its current dependency instructions before installing packages. If the project provides a requirements file, review it and install the documented dependencies inside the activated environment.

python -m pip install --upgrade pip
# If the repository provides requirements.txt:
python -m pip install -r requirements.txt

Do not assume that every version of PCredz uses the same dependency list. If installation fails, consult the official repository documentation and the error message before changing system packages.

5. Understanding Live Network Traffic Analysis

Live traffic analysis involves examining packets as they pass through a network interface. It can help authorized network administrators identify insecure authentication exchanges and investigate suspicious network activity.

Before performing live capture, identify the correct interface and verify that the capture is approved by the network owner. Interface names differ between systems, so do not assume that every machine uses eth0.

To list available interfaces, use:

ip -br addr

For an authorized assessment, follow the current usage instructions provided by the official PCredz repository. Confirm that the selected interface is appropriate and that the capture scope is limited to the approved environment.

Capturing on an interface does not guarantee visibility into all network traffic. Switching infrastructure, VLAN configuration, Wi-Fi encryption, virtualization, and network topology can affect which packets are observable.

6. Analyzing Existing PCAP Files

Offline PCAP analysis allows investigators to examine previously captured network traffic without continuously monitoring a live interface. This can be useful for incident response, security audits, and controlled training exercises.

PCAP files are commonly generated by packet analysis tools such as Wireshark and tcpdump.

Inspecting a Capture with Wireshark

Open the authorized PCAP file in Wireshark and examine the relevant protocols, endpoints, and authentication exchanges. Display filters can help narrow the investigation to specific protocols or conversations.

When reviewing a capture, pay particular attention to:

  • Services that use unencrypted or inadequately protected communication.
  • Authentication exchanges involving legacy protocols.
  • Unexpected connections to internal services.
  • Sensitive information accidentally included in application traffic.
  • Repeated authentication failures or unusual communication patterns.

Using PCredz for Offline Analysis

When using PCredz against an authorized capture, consult the current repository documentation for the supported command-line options.

The project's documented usage includes options for processing a capture file or a directory of captures. Confirm the precise syntax for your installed version before running an analysis.

After processing, store the results in a protected directory. Review the output carefully, because a discovered artifact may require additional context before it can be classified as a security finding.

Evidence-handling tip: Preserve the original capture, record its cryptographic hash when appropriate, document the analysis environment, and restrict access to extracted data. Avoid transferring confidential PCAP files to third-party systems unless that transfer is explicitly authorized.

7. PCredz and Hashcat: Understanding the Difference

PCredz and Hashcat serve different purposes in a security assessment.

PCredz identifies supported credential-related artifacts in captured network traffic. Hashcat is a password recovery and password-strength auditing tool that supports many hash formats.

Some authentication artifacts identified by PCredz may be suitable for further analysis with a compatible password-auditing tool. Compatibility depends on the exact artifact format, the protocol, and the supported mode in the installed version.

For example, Hashcat documents different modes for certain NTLM and Kerberos-related formats. A mode number must not be selected solely from a generic label: analysts should verify the exact format against the official documentation.

Hash analysis can help organizations determine whether their password policies resist common guessing attacks. A recovered password, however, does not by itself establish that an account is currently accessible or that the account has elevated privileges.

Official resource: Hashcat.

8. Security Risks and Defensive Measures

Credential exposure can allow an attacker to impersonate users, access internal services, or attempt further compromise. The actual risk depends on the credential type, account privileges, network architecture, and additional security controls.

Use Encrypted Protocols

Replace insecure protocols with appropriately configured encrypted alternatives. Use HTTPS for web applications and secure configurations for remote administration, email, and file transfer.

Strengthen Authentication

Use modern authentication mechanisms wherever possible. Disable obsolete authentication methods when they are no longer required, and enforce multifactor authentication for sensitive accounts and remote access.

Reduce Credential Reuse

Encourage unique passwords and use an approved password manager. Privileged accounts should have separate credentials and carefully controlled access.

Apply Least Privilege

Give users and services only the permissions they need. Segment sensitive systems and restrict unnecessary communication between network zones.

Monitor and Respond

Monitor authentication logs for suspicious access, repeated failures, unusual source systems, and unexpected use of privileged accounts. If credential exposure is confirmed, follow the incident response process, rotate affected credentials, and revoke compromised sessions where appropriate.

9. Common Misconceptions About PCredz

Does PCredz Crack Every Password?

No. PCredz is primarily used to identify supported artifacts in network traffic. Whether a password can be recovered depends on the data captured, the authentication protocol, and the availability of a compatible analysis method.

Can It Read Every HTTPS Password?

No. Properly configured HTTPS encrypts application traffic in transit. A normal packet capture generally cannot reveal the protected application contents simply because PCredz is being used.

Does Finding a Hash Mean an Account Is Compromised?

Not necessarily. A hash or authentication exchange must be assessed in context. Its security impact depends on the protocol, account status, password strength, and whether the artifact can be abused.

Is Live Capture Always Better Than Offline Analysis?

No. Live capture may help investigate current activity, while offline analysis is often more suitable for examining preserved evidence. The right approach depends on the investigation scope, authorization, and operational requirements.

10. Conclusion

PCredz is a useful tool for understanding credential exposure in network traffic. By examining authorized packet captures, cybersecurity professionals can identify authentication artifacts, investigate legacy protocols, and discover weaknesses that require remediation.

However, the value of PCredz goes beyond extracting data. Its findings can help organizations improve encryption, modernize authentication, reduce password reuse, and strengthen their incident response practices.

For anyone learning network security, the key takeaway is simple: understanding how authentication data moves across a network is essential to protecting it.

For more cybersecurity tutorials, ethical hacking resources, OSINT guides, and network security insights, visit Hackersking.

Topics covered: PCredz tutorial, PCredz Kali Linux, network credential analysis, PCAP analysis, network traffic analysis, NTLM authentication, Kerberos authentication, Hashcat, password security, ethical hacking tools, cybersecurity tools, incident response, network security, penetration testing, information security.
```

Attackers Abuse Legitimate Infrastructure to Distribute Phishing Emails

Researchers at Cisco Talos are tracking a significant increase in phishing campaigns that abuse legitimate platforms. Attackers abused more than 25 legitimate services over the past year, including “collaboration, productivity, file-sharing, survey, payment and AI-related platforms.”

In two campaigns, attackers used order notifications from Staples and Dell to distribute phishing messages. The organizations themselves were not compromised, but the threat actors inserted phishing content into the fields that were supposed to contain shipping information.

Job Seekers Who Use AI for Applications Need to be on the Lookout for Scams

Researchers at Malwarebytes warn that job seekers are increasingly vulnerable to scams as AI enables them to take a “spray-and-pray” approach to job applications.

Users who have automated their job application process are more likely to forget where they’ve applied, and an unsolicited message from a recruiter may seem more plausible. Job seekers can also be more willing to overlook or ignore red flags associated with scams, since they’re anxious to avoid missing an opportunity.

Warning: Calendly Phishing Pages Are Targeting Job Seekers

Researchers at Malwarebytes warn that a phishing campaign is using spoofed Calendly pages to trick users into handing over their Facebook and Google account credentials. The phishing sites pose as Calendly booking pages for job interviews at Meta, asking users to enter their information to sign up for a phone call with a recruiter.

NIS2 Part Two: How Stolen Vendor Data Fuels Downstream Attacks

In part one of this NIS2 series, we examined why vendor questionnaires fall short and how third-party breaches impact downstream organizations across Europe. But what happens after a supplier containment phase ends? The long-term danger lies in how attackers leverage exfiltrated supplier data to launch hyper-targeted social engineering attacks against an organization’s employees.

Social Engineering: Exploiting Human Psychology in Offensive Security

Welcome back, aspiring pentesters!

Social engineering is one of the most important parts of pentesting, and in many real attacks it’s the part that decides whether the whole operation succeeds or fails. Sometimes it even makes the technical side easier. 

Earlier we looked at BadUSB attacks and several persistence methods, and those examples already showed how much can be done when a person simply plugs in a device or follows a convincing instruction. In a pentest, you can achieve real impact after just walking into an office and interacting with the environment without breaking into the corporate network remotely and hoping some serious vulnerability was left unpatched.

Many pentesters are stronger with systems than with people in everyday life. That’s one reason they gravitate toward technical work. Social engineering forces them to step out of that comfort zone even further. But understanding how people make decisions is a practical skill. When you design a scenario with human behavior in mind, the success rate of your interactions can rise. That’s why both red teams and blue teams will benefit from it. 

Evolutionary Legacy

The brain is an old application. It’s software that has been running for thousands of years. New features have been added over time, but the core logic was never fully rewritten. Different developers came and went. Some old functions were never documented. Some code paths were never reviewed. The system kept growing, but the original structure remained inside it.

That is a pretty good description of the human brain.

Our brains are the result of evolution, and the most vulnerable mechanisms are often the oldest ones. These mechanisms helped our ancestors survive in situations where there was no time for deep analysis. We cannot delete that legacy. We can only learn to control it at a higher level of thinking. But the older layer is still there, and every person remains vulnerable to it in the right conditions.

Who Is More Vulnerable?

If you follow the media, you might get the impression that older people are always the easiest targets. Stories about elderly victims are emotionally powerful, so they get more attention. But that does not mean the data supports the stereotype in a simple way. Europol statistics on fraud victims who reported to the police show that the 18-34 age group made up 27.7 percent of victims, the 35-54 group 23.4 percent, the 55-64 group 21.7 percent, and the 65+ group 18.5 percent. That already shows that younger adults are very much in the picture. And that is only the official reporting side.

Age itself does not seem to make a person automatically more or less likely to be deceived. Cognitive ability also does not give the protection many people assume. A joint study by several American universities involving 1,220 participants found no meaningful correlation between cognitive ability and the likelihood of becoming a fraud victim. So being smart does not make you immune. Even very intelligent people can be tricked. Paul Frampton, a respected particle physicist and Nobel Prize candidate, was caught in a simple dating scam that led him to attempt to carry cocaine across a border. That case became famous not because he was foolish, but because it showed that intelligence alone does not protect a person from manipulation.

Vulnerable Optimization

The human brain has barely changed in size for thousands of years, but the amount of information we ask it to process has exploded. An ancient Greek farmer had roughly our brain and a tiny fraction of our information load. Today we face constant messages, deadlines, alerts, meetings, and decisions.

To cope, the brain optimizes. One of its oldest shortcuts is stereotypical sequential behavior (SPB). I’ve seen something like this before, so I’ll react quickly instead of thinking it through. This saves energy and speeds up decisions, which was vital for our ancestors since a fast response to danger could save a life. It’s the short route in thinking, faster and cheaper than analysis, and usually good enough.

Giving a logical reason can raise the success rate, but surprisingly, even a meaningless reason works almost as well. The brain didn’t evaluate the explanation, it simply reacted to the fact that one existed.

A phishing email with a short explanation (edited). Source: CaniPhish

Brain DoS

One of the easiest ways to force the brain into this energy-saving mode is to overwhelm it.

Emotional overload is one method. If someone triggers fear, stress, panic, or even strong excitement, they reduce the victim’s ability to think clearly. A frightened person doesn’t evaluate things carefully. They react, and that reaction is often automatic. Positive excitement can work too.

Hackers try to flood the brain with too much information from too many channels at once. A person trying to write a document, answer messages, listen to a coworker, and process notifications in the background will burn out mentally pretty fast. In that state, analysis gets difficult and the brain starts skipping into automatic behavior. That’s why overload is such a powerful social engineering tool. It pushes people away from deliberate thinking and into fast reaction.

A phishing email exploiting fear. Source: CaniPhish

Most Common Psychological Exploits

The psychology of influence contains many principles, and they show up everywhere, in marketing, advertising, sales, politics, therapy, and more. But for a hacker writing a phishing email or planning a phone script, only a few of these tend to matter most.

The three big ones are authority, scarcity, and consistency.

Principle of Authority

People naturally trust experts in areas where they themselves aren’t experts. If someone appears qualified, successful, wealthy, or powerful, we tend to listen. That’s part of how we navigate the world.

The real vulnerability is that authority can be faked.

People use white coats on television to sell toothpaste. So-called success coaches pose in front of expensive cars or Dubai skyscrapers to create an illusion of status. Well-known restaurant chains use actors from popular TV shows to advertise food. That’s exactly how fake authority works. The external costume creates the internal belief.

The Milgram experiment is a good demonstration of this. In 1963, participants were willing to obey an authority figure even when it made them uncomfortable and conflicted with their own moral instincts. The lesson is that authority has a very real psychological effect. Evolution plays a part here too. Human society developed through division of labor, and that made us more dependent on specialists. We got used to trusting experts. Hackers abuse that instinct all the time.

Here’s an example of a phishing email that appears to come from a manager and can’t be ignored.

A phishing email exploiting the principle of authority (edited). Source: CaniPhish

Principle of Scarcity

Scarcity is about the fear of missing out. People value things more when they are rare, limited, or disappearing. A product that says “only three left” feels more urgent. A limited-time offer feels more valuable. Even when the item is not actually better, scarcity makes it feel that way. This is an old human pattern. Imported or hard-to-find goods often seem more valuable than ordinary local alternatives, even when they are not objectively better. The absence of abundance created desirability.

Principle of Consistency

Consistency is one of the least obvious but most effective manipulation principles. 

People prefer to be consistent with their earlier actions and statements. Society rewards consistency. A person who constantly changes their opinion is often viewed as unreliable or weak. A person who follows through is seen as stable and trustworthy. That social pressure matters a lot.

The problem is that being consistent is not the same as being correct. Once a person takes an initial step, they often become more willing to continue in the same direction. That saves mental energy and reduces self-doubt. It also fits the brain’s tendency to follow a behavioral script instead of starting analysis from scratch each time. Patricia Pliner’s study showed this clearly. Participants who first wore a badge supporting cancer research were later much more willing to donate to the cause. The first small commitment made the second one easier.

When a victim has already made a small commitment, continuing becomes easier than stopping.

Exploitation

To turn these principles into real social engineering operations hackers build scenarios. That scenario is most effective in a phone call, because a call allows hackers to guide the victim step by step and react to hesitation. Email phishing can also use these ideas, but the room for dynamic adaptation is smaller. The best phishing messages are not necessarily the loudest. They are the ones that fit the target’s mental state at the exact moment of delivery.

Emails and the 7% rule

In many social engineering assessments, a pattern appears again and again. When you send a large batch of phishing emails, a certain percentage of recipients will almost always act. The exact figure changes by organization, but the baseline rarely disappears.

Even when companies train users, run simulations and repeat awareness courses, there is often still a small percentage of people who click or respond. Why? Because at that moment, some of them are tired, stressed, busy, distracted or simply overloaded. At that moment, the person does not reach the analysis stage.

That is why training alone is not enough. Training helps, but it does not eliminate the human condition.

A phishing email triggering excitement. Source: CaniPhish

The most effective emails are often the ones that trigger stress or excitement directly. A message that creates urgency or a strong emotional reaction can overpower careful thinking. Once that happens, hackers move into the next steps.

Trigger Bypass Techniques

Most people have simple mental triggers that hold up even under pressure. The trick is that attackers can sometimes bypass those triggers by shifting the context.

A person might say they never share passwords. But that rule can get bypassed if the attacker presents a password generator, an IT support request, or a command they’re told to run for verification. The target can still believe they’re following their rule, even while being manipulated out of it. Verification habits can also be bypassed with fake signatures, familiar names, or a two-step sequence that starts with something safe. A short first interaction lowers suspicion, and then a second one carries the real pressure. That’s often more effective than starting aggressively. Company rules can be bypassed by changing the frame. A USB drive disguised as a personal gift feels different from an unknown device dropped on a desk. The same object reads very differently depending on the story around it.

That’s why social engineering isn’t about one universal trick. It’s about adapting the story to the trigger.

Protection

For companies, the best defense is a mix of organizational measures, technical controls, and incident response. Training lowers the success rate of simple attacks. Technical controls reduce the damage when someone does make a mistake. And since no defense is perfect, response procedures matter too. Organizations need to know what to do when a suspicious message, call, or request slips through.

Individuals should not be afraid to refuse. Don’t feel obligated to be polite when something feels wrong. If a call creates stress, stop and think instead of reacting automatically. Never make important decisions while overwhelmed. Learn to recognize manipulation patterns, and don’t keep a suspicious conversation going just because the other side sounds official.

Sometimes the safest choice is just to hang up.

Summary

There’s no guaranteed technique for success, and no guaranteed protection either. Human beings are vulnerable because evolution made us efficient, not perfect. That efficiency helps us survive, but it also gives social engineers a way in.

To reduce the probability of these attacks, we offer our Security Awareness and Risk Management training for companies. For pentesters, we offer The Science and Art of Social Engineering, where Master OTW walks you through the tools and techniques needed to become an effective social engineer.

The post Social Engineering: Exploiting Human Psychology in Offensive Security first appeared on Hackers Arise.

Report: 9 out of 10 Americans Have Been Targeted by Scams

91% of Americans have been targeted by a scam, and 17% have fallen victim to one, according to a new survey by Consumer Reports. Notably, 20% of respondents said the latest scam they encountered was personalized, indicating that attackers are increasingly using automation and public or leaked information to craft targeted phishing attacks.

❌