When researchers analyzed how Pegasus spyware infected iPhones without the user tapping anything, they found something wild. The attackers sent an iMessage with a fake GIF that targeted Apple's image decompression engine. The decompression math was so flexible that the exploit

Microsoft Threat Intelligence has observed threat actors using agentic AI tools to search public GitHub repositories for exposed secrets and then using stolen secrets for further malicious activity against the compromised organization.

Searching open

Chrome 157 fixes 213 security issues, 7 of them critical.

Two hundred and thirteen is a lot of anything.

The browser is the most patched piece of software most people own. And it's still not enough.

Security Engineering & Cloud Security Agents

Problem Statement

Analyzing AWS/GCP IAM permission structures to determine potential escalation pathways (e.g., iam:PassRole combined with ec2:RunInstances) requires evaluating complex, nested JSON policy documents. Human reviewers easily miss transitive permission grants, leading to undetected attack paths.

Goal

Build an agentic security scanner that ingests IAM policy JSON, identifies high-risk privilege escalation vectors, and calculates the potential blast radius.

Outcome Measurement

  1. Escalation Vector Discovery: Identified 100% of known AWS IAM privilege escalation patterns in test suites.
  2. Remediation Speed: Generated least-privilege replacement policies automatically.

How the Code was Built

The implementation extracts statement blocks from IAM policy JSON, runs structured LLM evaluation against known privilege escalation patterns, and outputs an assessment.

Executable Code

import json
from pydantic import BaseModel, Field
from langchain_openai import ChatOpenAI
class EscalationVector(BaseModel):
technique_name: str = Field(description="Name of privilege escalation technique, e.g., iam:PassRole to EC2")
vulnerable_action: str = Field(description="Action permitting escalation")
blast_radius: str = Field(description="HIGH, MEDIUM, or LOW impact assessment")
remediation_policy: str = Field(description="Least-privilege policy replacement JSON")
def analyze_iam_policy(iam_policy_json: dict) -> EscalationVector:
llm = ChatOpenAI(model="gpt-4o", temperature=0)
structured_llm = llm.with_structured_output(EscalationVector)
prompt = f"""
Analyze this AWS IAM Policy for privilege escalation vulnerabilities:
{json.dumps(iam_policy_json, indent=2)}
Evaluate if actions like iam:PassRole, iam:CreateAccessKey, iam:AttachUserPolicy allow escalation to Administrator Access.
"""
return structured_llm.invoke(prompt)
if __name__ == "__main__":
vulnerable_iam = {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:PassRole",
"ec2:RunInstances"
],
"Resource": "*"
}
]
}
res = analyze_iam_policy(vulnerable_iam)
print(f"Technique Identified: {res.technique_name}")
print(f"Blast Radius: {res.blast_radius}")
print(f"Remediation Policy:\n{res.remediation_policy}")

Leave a Reply

Trending