Skip to content
Knowledge base Updated: February 5, 2026

Email Security - How to Protect Your Company from Ransomware and Phishing

90% of ransomware attacks start with an email. Learn practical methods to protect business email: SPF, DKIM, DMARC, attachment sandboxing, SEG.

Why is Email the Main Gateway for Ransomware?

90% of ransomware attacks start with a malicious email. Phishing remains the most effective method for delivering ransomware to organizations because:

  • Email reaches employees with access to critical data directly
  • Users are accustomed to opening attachments and clicking links
  • Even aware employees make mistakes under time pressure
  • Attacks are increasingly sophisticated (spear phishing, BEC)
Ransomware Attack VectorShare (2025)
Email (phishing, attachments)90%
Vulnerability exploitation (RDP, VPN)6%
Malvertising, drive-by download2%
USB, insider threat2%

📚 Read the complete guide: Ransomware: Ransomware - czym jest, jak się chronić, co robić po ataku

Anatomy of Email-Based Ransomware Attack

Typical attack scenario:

┌─────────────────────────────────────────────────────────────────┐
│ 1. RECON: Attacker gathers company info (LinkedIn, web)         │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ 2. WEAPONIZATION: Prepares email with attachment/link           │
│    - Fake invoice (invoice_2026.xlsm)                           │
│    - Document with macro                                        │
│    - Link to fake login page                                    │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ 3. DELIVERY: Sends email impersonating trusted sender           │
│    - Vendor domain spoofing                                     │
│    - Compromised trusted partner account                        │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ 4. EXPLOITATION: User opens attachment/clicks link              │
│    - Macro downloads dropper                                    │
│    - Credential harvesting                                      │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ 5. INSTALLATION: Ransomware installs in system                  │
│    - Persistence (autostart, scheduled tasks)                   │
│    - Lateral movement (PsExec, WMI, SMB)                        │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│ 6. ENCRYPTION: File encryption, ransom demand                   │
└─────────────────────────────────────────────────────────────────┘

Layered Email Protection (Defense in Depth)

Effective protection requires multiple layers:

┌────────────────────────────────────────────────────────────┐
│                    EMAIL PROTECTION LAYERS                  │
├────────────────────────────────────────────────────────────┤
│ 1. SENDER AUTHENTICATION                                   │
│    • SPF - who can send on behalf of domain               │
│    • DKIM - cryptographic signature                       │
│    • DMARC - policy and reporting                         │
├────────────────────────────────────────────────────────────┤
│ 2. SECURE EMAIL GATEWAY (SEG)                              │
│    • Anti-spam, anti-malware                              │
│    • Sender/IP reputation                                 │
│    • Heuristic analysis                                   │
├────────────────────────────────────────────────────────────┤
│ 3. ATTACHMENT SANDBOXING                                   │
│    • Detonation in isolated environment                   │
│    • Behavioral analysis                                  │
│    • Zero-day protection                                  │
├────────────────────────────────────────────────────────────┤
│ 4. URL PROTECTION                                          │
│    • Time-of-click analysis                               │
│    • URL rewriting                                        │
│    • Malicious site blocking                              │
├────────────────────────────────────────────────────────────┤
│ 5. USER AWARENESS                                          │
│    • Phishing training                                    │
│    • Attack simulations                                   │
│    • Suspicious email reporting                           │
└────────────────────────────────────────────────────────────┘

SPF, DKIM, DMARC - Security Foundation

SPF (Sender Policy Framework)

SPF defines which servers can send email on behalf of your domain.

How it works:

  1. You publish a DNS TXT record with list of authorized servers
  2. Receiving server checks if sender is on the list
  3. If not - email may be rejected or marked as spam

Example SPF record:

yourcompany.com TXT "v=spf1 include:_spf.google.com include:sendgrid.net ip4:1.2.3.4 -all"

Explanation:

  • v=spf1 - SPF version
  • include:_spf.google.com - authorize Google Workspace servers
  • include:sendgrid.net - authorize SendGrid
  • ip4:1.2.3.4 - authorize specific IP
  • -all - reject everything else (hard fail)

SPF policies:

PolicyMeaningRecommendation
+allAccept everythingNEVER use
~allSoft fail (mark as suspicious)Testing phase
-allHard fail (reject)Production
?allNeutralDoesn’t protect

DKIM (DomainKeys Identified Mail)

DKIM adds a digital signature to every sent email.

How it works:

  1. Sending server signs email with private key
  2. Public key is published in DNS
  3. Receiving server verifies signature

Example DKIM record:

selector1._domainkey.yourcompany.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."

Benefits:

  • Verification that email wasn’t modified in transit
  • Confirmation of sender domain identity
  • Required by DMARC

DMARC (Domain-based Message Authentication, Reporting & Conformance)

DMARC combines SPF and DKIM into coherent policy with reporting.

Example DMARC record:

_dmarc.yourcompany.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@yourcompany.com; pct=100"

Explanation:

  • v=DMARC1 - version
  • p=reject - policy (reject emails failing SPF/DKIM)
  • rua=mailto:... - address for aggregate reports
  • pct=100 - percentage of emails covered by policy

DMARC policies:

PolicyActionWhen to use
p=noneReporting onlyInitial phase (monitoring)
p=quarantineMark as spamTransition phase
p=rejectRejectFull protection

DMARC implementation timeline:

WeekAction
1-2Implement SPF for all email sources
3-4Implement DKIM
5-6DMARC p=none + report analysis
7-8Fix sources failing SPF/DKIM
9-10DMARC p=quarantine
11-12DMARC p=reject

Secure Email Gateway (SEG)

SEG is a dedicated solution filtering email before reaching users.

Key SEG Features

FeatureDescriptionEffectiveness
Anti-spamFiltering unwanted mail99%+
Anti-malwareKnown threat signatures95%+
SandboxingAttachment analysis in isolationDetects zero-day
URL filteringMalicious link blockingReal-time
Impersonation protectionSpoofing detectionProtects against BEC
Data Loss PreventionData leak blockingCompliance
SolutionDeploymentKey Features
Microsoft Defender for Office 365CloudM365 integration, ATP
ProofpointCloud/On-premSandbox leader
MimecastCloudStrong BEC protection
Fortinet FortiMailOn-prem/CloudFortiGate integration
Check Point Harmony EmailCloudUnified security

Configuration Best Practices

1. Enable blocking of dangerous file types:

Block: .exe, .scr, .bat, .cmd, .ps1, .vbs, .js, .jar, .msi
Block with password: .zip, .rar, .7z (if containing above)

2. Enable blocking of macros in Office documents:

Block: .xlsm, .docm, .pptm (or pass through sandbox)
Alternatively: convert to PDF

3. Enable sandboxing for all attachments:

Sandbox: all files except whitelist
Timeout: 60-120 seconds
Action on detection: quarantine + alert

Attachment Sandboxing

Sandboxing is a technique of running attachments in isolated environment to detect malicious behavior.

How Sandbox Works

┌─────────────────────────────────────────────────────────────┐
│                    SANDBOX WORKFLOW                          │
├─────────────────────────────────────────────────────────────┤
│ 1. Email with attachment arrives at gateway                 │
│ 2. Attachment sent to sandbox                               │
│ 3. Detonation in isolated virtual machine                   │
│    - File execution                                         │
│    - Monitoring: processes, network, registry, filesystem   │
│ 4. Behavioral analysis (does it try to download malware,    │
│    encrypt files, connect to C2)                            │
│ 5. Verdict: clean / malicious                               │
│ 6. If malicious → quarantine + alert                        │
│ 7. If clean → deliver to user                               │
└─────────────────────────────────────────────────────────────┘

Evasion Techniques and Countermeasures

Attackers try to bypass sandbox:

Evasion TechniqueDescriptionCountermeasure
Time delayMalware waits before activationExtended analysis (5+ min)
VM detectionChecks if in VMBare-metal sandbox
User interactionRequires clickClick simulation
Environment checkChecks computer nameRealistic environment
Encrypted payloadPassword in email bodyML analysis, OCR

URL Protection

Links in emails are the second main attack vector.

URL Attack Techniques

  1. Phishing page - fake login page
  2. Drive-by download - automatic malware download
  3. Redirect chains - chain of redirects hiding destination
  4. URL shorteners - bit.ly, tinyurl hiding real URL
  5. Homoglyph attacks - microśoft.com instead of microsoft.com
Original URL: https://malicious.com/invoice

Rewritten URL: https://urldefense.proofpoint.com/v2/url?u=https%3A%2F%2Fmalicious.com...

On click: real-time scan → if malicious → block

URL Protection Configuration

✓ Enable URL rewriting for all emails
✓ Enable time-of-click analysis
✓ Block known-bad domains
✓ Display warning on redirect to external sites
✓ Block URL shorteners or expand before analysis
✓ Enable typosquatting detection

Security Awareness Training

Technology isn’t enough - employees must be aware of threats.

Training Program

FrequencyFormatContent
OnboardingTrainingPhishing basics, email security
MonthlyMicro-learning5-min modules, quizzes
QuarterlyPhishing simulationTest + feedback
AnnuallyFull trainingReview + new threats

Awareness Metrics

MetricTargetHow to Measure
Click rate (simulation)< 5%Phishing campaigns
Reporting rate> 20%Reports to SOC
Training completion> 95%LMS tracking
Time to report< 5 minFrom opening to reporting

Phishing Button

Implement “Report Phishing” button in email client:

Benefits:

  • Easy reporting of suspicious emails
  • Automatic analysis in SOC
  • Building security culture
  • Crowd-sourced threat intel

Email Security Implementation Checklist

Phase 1: Fundamentals (Week 1-4)

□ Audit current email configuration
□ Implement SPF for all sources
□ Implement DKIM
□ Implement DMARC p=none + monitoring
□ Inventory all applications sending email

Phase 2: SEG and Sandboxing (Week 5-8)

□ Select and deploy SEG
□ Configure dangerous file type blocking
□ Enable attachment sandboxing
□ Configure URL protection
□ Integrate with SIEM

Phase 3: Hardening (Week 9-12)

□ DMARC p=quarantine → p=reject
□ Fine-tune SEG rules (reduce false positives)
□ Implement impersonation protection
□ Configure DLP
□ Email security penetration testing

Phase 4: Awareness (Ongoing)

□ Implement training program
□ First phishing simulation campaign
□ Implement phishing button
□ Analyze and iterate based on results

Effectiveness Metrics

MetricHow to MeasureTarget
DMARC complianceDMARC reports> 99%
Malware blockedSEG logsTrack trend
Phishing blockedSEG logsTrack trend
User click rateSimulations< 5%
Time to blockSOC metrics< 15 min
False positive rateUser reports< 0.1%

FAQ

Isn’t Microsoft 365 / Google Workspace enough?

Built-in protections are good but not the best. Consider additional SEG if:

  • You’re a spear phishing / APT target
  • You need advanced sandboxing
  • You have compliance requirements (e.g., DORA)

How much does email security implementation cost?

ComponentCost (estimated)
SPF/DKIM/DMARCFree (configuration)
Microsoft Defender for O365 P2~$5/user/month
Enterprise SEG$3-15/user/month
Awareness platform$1-5/user/month

How quickly do you see results?

  • SPF/DKIM/DMARC: immediately (spoofing reduction)
  • SEG: immediately (known threat blocking)
  • Sandboxing: immediately (zero-day protection)
  • Awareness: 3-6 months (behavior change)

Summary

  • 90% of ransomware starts with email - it’s the main attack vector
  • SPF + DKIM + DMARC is the foundation - implement with p=reject policy
  • SEG with sandboxing detects zero-day - essential for every company
  • URL protection blocks phishing - enable time-of-click analysis
  • Awareness changes behaviors - quarterly phishing simulations
  • Layered protection (Defense in Depth) - one layer isn’t enough

Want to check your email security? Order email security audit or phishing simulation. Contact us.

Learn key terms related to this article in our cybersecurity glossary:

  • Phishing — Phishing is a type of social engineering attack that aims to deceive the victim…
  • Ransomware — Ransomware is a type of malicious software (malware) that blocks access to a…
  • Spear Phishing — Spear phishing is an advanced form of phishing in which attackers target…
  • Cybersecurity — Cybersecurity is a collection of techniques, processes, and practices used to…
  • Email Spoofing — Email spoofing is a cyberattack technique involving falsifying the sender’s…

Learn More

Explore related articles in our knowledge base:


Explore Our Services

Need cybersecurity support? Check out:

Share:

Talk to an expert

Have questions about this topic? Get in touch with our specialist.

Product Manager
Grzegorz Gnych

Grzegorz Gnych

Sales Representative

Response within 24 hours
Free consultation
Individual approach

Providing your phone number will speed up contact.

Want to Reduce IT Risk and Costs?

Book a free consultation - we respond within 24h

Response in 24h Free quote No obligations

Or download free guide:

Download NIS2 Checklist