Building MSI PromptDefense Suite: How a Safety Tool Became a Security Platform

The Impetus: Wanting Something We Could Actually Run

Like many security folks watching the rise of LLM-driven workflows, I kept hearing the same conversations about prompt injection. They were thoughtful discussions. Smart people. Solid theory.

But the theory wasn’t what I wanted.

What I wanted was something we could actually run.

The moment that really pushed me forward came when I started testing real prompt-injection payloads against simple LLM workflows that pull content from the internet. Suddenly, the problem didn’t feel abstract anymore. A malicious instruction buried in retrieved text could quietly override system instructions, leak data, or coerce tools.

At that point, the goal became clear: build a practical defensive layer that could sit between untrusted content and an LLM — and make sure the application didn’t fall apart when something suspicious showed up.

AISecImage


What I Set Out to Build

The initial concept was simple: create a defensive scanner that could inspect incoming text before it ever reached a model. That idea eventually became PromptShield.

PromptShield focuses on defensive controls:

  • Scanning untrusted text and structured data

  • Detecting prompt injection patterns

  • Applying context-aware policies based on source trust

  • Routing suspicious content safely without crashing workflows

But I quickly realized something important:

Security teams don’t just need blocking.

They need proof.

That realization led to the second tool in the suite: InjectionProbe — an offensive assessment library and CLI designed to test scripts and APIs with standardized prompt-injection payloads and produce structured reports.

The goal became a full lifecycle toolkit:

  • PromptShield – Prevent prompt injection and sanitize risky inputs

  • InjectionProbe – Prove whether attacks still succeed

In other words: one suite that both blocks attacks and verifies what still slips through.


The Build Journey

Like many engineering projects, the first version was far from elegant. It started with basic pattern matching and policy routing.

From there, the system evolved quickly:

  • Structured payload scanning

  • JSON logging and telemetry

  • Regression testing harnesses

  • Red-team simulation frameworks

Over time the detection logic expanded to handle a wide range of adversarial techniques including:

  • Direct prompt override attempts

  • Data exfiltration instructions

  • Tool abuse and role hijacking

  • Base64 and encoded payloads

  • Leetspeak and Unicode confusables

  • Typoglycemia attacks

  • Indirect retrieval injection

  • Transcript and role spoofing

  • Many-shot role chain manipulation

  • Multimodal instruction cues

  • Bidi control character tricks

Each time a bypass appeared, it became part of a versioned adversarial corpus used for regression testing.

That was a turning point: attacks became test cases, and the system started behaving more like a traditional secure software project with CI gates and measurable thresholds.


The Fun Part

The most satisfying moments were watching the “misses” shrink after each defensive iteration.

There’s something deeply rewarding about seeing a payload that slipped through last week suddenly fail detection tests because you tightened a rule or added a new heuristic.

Another surprisingly enjoyable part was the naming process.

What started as a set of ad-hoc scripts slowly evolved into something that looked like a real platform. Eventually the pieces came together under a single identity: the MSI PromptDefense Suite.

That naming step might seem cosmetic, but it matters. Branding and workflow clarity are often what turn a security experiment into something teams actually adopt.


Lessons Learned

A few practical lessons emerged during the process:

  • Defense and offense must evolve together. Building detection without testing is guesswork.

  • Fail-safe behavior matters. Detection should never crash the application path.

  • Attack corpora should be versioned like code. This prevents security regressions.

  • Context-aware policy is a major win. Not all sources deserve the same trust level.

  • Clear reporting drives adoption. Security tools need outputs stakeholders can understand.

One practical takeaway: prompt injection testing should look more like unit testing than traditional penetration testing. It should be continuous, automated, and measurable.


Where Things Landed

The final result is a fully operational toolkit:

  • PromptShield defensive scanning library

  • InjectionProbe offensive testing framework

  • CI-style regression gates

  • JSON and Markdown assessment reporting

The suite produces artifacts such as:

  • injectionprobe_results.json

  • injectionprobe_findings_todo.md

  • assessment_report.json

  • assessment_report.md

These outputs give both developers and security teams a consistent way to evaluate the safety posture of AI-integrated systems.


What Comes Next

There’s still plenty of room to expand the platform:

  • Semantic classifiers layered on top of pattern detection

  • Adapters for queues, webhooks, and agent frameworks

  • Automated baseline policy profiles

  • Expanded adversarial benchmark corpora

The AI ecosystem is evolving quickly, and defensive tooling needs to evolve just as fast.

The good news is that the engineering model works: treat attacks like test cases, keep the corpus versioned, and measure improvements continuously.


More Information and Help

If your organization is integrating LLMs with internet content, APIs, or automated workflows, prompt injection risk needs to be part of your threat model.

At MicroSolved, we work with organizations to:

  • Assess AI-enabled systems for prompt injection risks

  • Build practical defensive guardrails around LLM workflows

  • Perform offensive testing against AI integrations and agent systems

  • Implement monitoring and policy enforcement for production environments

If you’d like to explore how tools like the MSI PromptDefense Suite could be applied in your environment — or if you want experienced consultants to help evaluate the security of your AI deployments — contact the MicroSolved team to start the conversation.

Practical AI security starts with testing, measurement, and iterative defense.

 

 

* AI tools were used as a research assistant for this content, but human moderation and writing are also included. The included images are AI-generated.

From Alert Volume to Signal Yield: An Economic Framework for Measuring SOC Effectiveness

Six months after a major alert-reduction initiative, a SOC director proudly reports a 42% decrease in daily alerts. The dashboards look cleaner. The queue is shorter. Analysts are no longer drowning.

Leadership applauds the efficiency gains.

Then reality intervenes.

A lateral movement campaign goes undetected for weeks. Analyst burnout hasn’t meaningfully declined. The cost per incident response remains stubbornly flat. And when the board asks a simple question — “Are we more secure now?” — the answer becomes uncomfortable.

Because while alert volume decreased, risk exposure may not have.

This is the uncomfortable truth: alert volume is a throughput metric. It tells you how much work flows through the system. It does not tell you how much value the system produces.

If we want to mature security operations beyond operational tuning, we need to move from counting alerts to measuring signal yield. And to do that, we need to treat detection engineering not as a technical discipline — but as an economic system.

AppSec


The Core Problem: Alert Volume Is a Misleading Metric

At its core, an alert is three things:

  1. A probabilistic signal.

  2. A consumption of analyst time.

  3. A capital allocation decision.

Every alert consumes finite investigative capacity. That capacity is a constrained resource. When you generate an alert, you are implicitly allocating analyst capital to investigate it.

And yet, most SOCs measure success by reducing the number of alerts generated.

The second-order consequence? You optimize for less work, not more value.

When organizations focus on alert reduction alone, they may unintentionally optimize for:

  • Lower detection sensitivity

  • Reduced telemetry coverage

  • Suppressed edge-case detection

  • Hidden risk accumulation

Alert reduction is not inherently wrong. But it exists on a tradeoff curve. Lower volume can mean higher efficiency — or it can mean blind spots.

The mistake is treating volume reduction as an unqualified win.

If alerts are investments of investigative time, then the right question isn’t “How many alerts do we have?”

It’s:

What is the return on investigative time (ROIT)?

That is the shift from operations to economics.


Introducing Signal Yield: A Pareto Model of Detection Value

In most mature SOCs, alert value follows a Pareto distribution.

  • Roughly 20% of alert types generate 80% of confirmed incidents.

  • A small subset of detections produce nearly all high-severity findings.

  • Entire alert families generate near-zero confirmed outcomes.

Yet we often treat every alert as operationally equivalent.

They are not.

To move forward, we introduce a new measurement model: Signal Yield.

1. Signal Yield Rate (SYR)

SYR = Confirmed Incidents / Total Alerts (per detection family)

This measures the percentage of alerts that produce validated findings.

A detection with a 12% SYR is fundamentally different from one with 0.3%.

2. High-Severity Yield

Critical incidents / Alert type

This isolates which detection logic produces material risk reduction — not just activity.

3. Signal-to-Time Ratio

Confirmed impact per analyst hour consumed.

This reframes alerts in terms of labor economics.

4. Marginal Yield

Additional confirmed incidents per incremental alert volume.

This helps determine where the yield curve flattens.


The Signal Yield Curve

Imagine a curve:

  • X-axis: Alert volume

  • Y-axis: Confirmed incident value

At first, as coverage expands, yield increases sharply. Then it begins to flatten. Eventually, additional alerts add minimal incremental value.

Most SOCs operate blindly on this curve.

Signal yield modeling reveals where that flattening begins — and where engineering effort should be concentrated.

This is not theoretical. It is portfolio optimization.


The Economic Layer: Cost Per Confirmed Incident

Operational metrics tell you activity.

Economic metrics tell you efficiency.

Consider:

Cost per Validated Incident (CVI)
Total SOC operating cost / Confirmed incidents

This introduces a critical reframing: security operations produce validated outcomes.

But CVI alone is incomplete. Not all incidents are equal.

So we introduce:

Weighted CVI
Total SOC operating cost / Severity-weighted incidents

Now the system reflects actual risk reduction.

At this point, detection engineering becomes capital allocation.

Each detection family resembles a financial asset:

  • Some generate consistent high returns.

  • Some generate noise.

  • Some consume disproportionate capital for negligible yield.

If a detection consumes 30% of investigative time but produces 2% of validated findings, it is an underperforming asset.

Yet many SOCs retain such detections indefinitely.

Not because they produce value — but because no one measures them economically.


The Detection Portfolio Matrix

To operationalize this, we introduce a 2×2 model:

  High Yield Low Yield
High Volume Core Assets Noise Risk
Low Volume Precision Signals Monitoring Candidates

Core Assets

High-volume, high-yield detections. These are foundational. Optimize, maintain, and defend them.

Noise Risk

High-volume, low-yield detections. These are capital drains. Redesign or retire.

Precision Signals

Low-volume, high-yield detections. These are strategic. Stress test for blind spots and ensure telemetry quality.

Monitoring Candidates

Low-volume, low-yield. Watch for drift or evolving relevance.

This model forces discipline.

Before building a new detection, ask:

  • What detection cluster does this belong to?

  • What is its expected yield?

  • What is its expected investigation cost?

  • What is its marginal ROI?

Detection engineering becomes intentional investment, not reactive expansion.


Implementation: Transitioning from Volume to Yield

This transformation does not require new tooling. It requires new categorization and measurement discipline.

Step 1 – Categorize Detection Families

Group alerts by logical family (identity misuse, endpoint anomaly, privilege escalation, etc.). Avoid measuring at individual rule granularity — measure at strategic clusters.

Step 2 – Attach Investigation Cost

Estimate average analyst time per alert category. Even approximations create clarity.

Time is the true currency of the SOC.

Step 3 – Calculate Yield

For each family:

  • Signal Yield Rate

  • Severity-weighted yield

  • Time-adjusted yield

Step 4 – Plot the Yield Curve

Identify:

  • Where volume produces diminishing returns

  • Which families dominate investigative capacity

  • Where engineering effort should concentrate

Step 5 – Reallocate Engineering Investment

Focus on:

  • Improving high-impact detections

  • Eliminating flat-return clusters

  • Re-tuning threshold-heavy anomaly models

  • Investing in telemetry that increases high-yield signal density

This is not about eliminating alerts.

It is about increasing return per alert.


A Real-World Application Example

Consider a SOC performing yield analysis.

They discover:

  • Credential misuse detection: 18% yield

  • Endpoint anomaly detection: 0.4% yield

  • Endpoint anomaly consumes 40% of analyst time

Under a volume-centric model, anomaly detection appears productive because it generates activity.

Under a yield model, it is a capital drain.

The decision:

  • Re-engineer anomaly thresholds

  • Improve identity telemetry depth

  • Increase focus on high-yield credential signals

Six months later:

  • Confirmed incident discovery increases

  • Analyst workload becomes strategically focused

  • Weighted CVI decreases

  • Burnout declines

The SOC didn’t reduce alerts blindly.

It increased signal density.


Third-Order Consequences

When SOCs optimize for signal yield instead of alert volume, several systemic changes occur:

  1. Board reporting becomes defensible.
    You can quantify risk reduction efficiency.

  2. Budget conversations mature.
    Funding becomes tied to economic return, not fear narratives.

  3. “Alert theater” declines.
    Activity is no longer mistaken for effectiveness.

  4. Detection quality compounds.
    Engineering effort concentrates where marginal ROI is highest.

Over time, this shifts the SOC from reactive operations to disciplined capital allocation.

Security becomes measurable in economic terms.

And that changes everything.


The Larger Shift

We are entering an era where AI will dramatically expand alert generation capacity. Detection logic will become cheaper to create. Telemetry will grow.

If we continue to measure success by volume reduction alone, we will drown more efficiently.

Signal yield is the architectural evolution.

It creates a common language between:

  • SOC leaders

  • CISOs

  • Finance

  • Boards

And it elevates detection engineering from operational tuning to strategic asset management.

Alert reduction was Phase One.

Signal economics is Phase Two.

The SOC of the future will not be measured by how quiet it is.

It will be measured by how much validated risk reduction it produces per unit of capital consumed.

That is the metric that survives scrutiny.

And it is the metric worth building toward.

 

 

* AI tools were used as a research assistant for this content, but human moderation and writing are also included. The included images are AI-generated.

Evolving the Front Lines: A Modern Blueprint for API Threat Detection and Response

As APIs now power over half of global internet traffic, they have become prime real estate for cyberattacks. While their agility and integration potential fuel innovation, they also multiply exposure points for malicious actors. It’s no surprise that API abuse ranks high in the OWASP threat landscape. Yet, in many environments, API security remains immature, fragmented, or overly reactive. Drawing from the latest research and implementation playbooks, this post explores a comprehensive and modernized approach to API threat detection and response, rooted in pragmatic security engineering and continuous evolution.

APIMonitoring

 The Blind Spots We Keep Missing

Even among security-mature organizations, API environments often suffer from critical blind spots:

  •  Shadow APIs – These are endpoints deployed outside formal pipelines, such as by development teams working on rapid prototypes or internal tools. They escape traditional discovery mechanisms and logging, leaving attackers with forgotten doors to exploit. In one real-world breach, an old version of an authentication API exposed sensitive user details because it wasn’t removed after a system upgrade.
  •  No Continuous Discovery – As DevOps speeds up release cycles, static API inventories quickly become obsolete. Without tools that automatically discover new or modified endpoints, organizations can’t monitor what they don’t know exists.
  •  Lack of Behavioral Analysis – Many organizations still rely on traditional signature-based detection, which misses sophisticated threats like “low and slow” enumeration attacks. These involve attackers making small, seemingly benign requests over long periods to map the API’s structure.
  •  Token Reuse & Abuse – Tokens used across multiple devices or geographic regions can indicate session hijacking or replay attacks. Without logging and correlating token usage, these patterns remain invisible.
  •  Rate Limit Workarounds – Attackers often use distributed networks or timed intervals to fly under static rate-limiting thresholds. API scraping bots, for example, simulate human interaction rates to avoid detection.

 Defenders: You’re Sitting on Untapped Gold

For many defenders, SIEM and XDR platforms are underutilized in the API realm. Yet these platforms offer enormous untapped potential:

  •  Cross-Surface Correlation – An authentication anomaly in API traffic could correlate with malware detection on a related endpoint. For instance, failed logins followed by a token request and an unusual download from a user’s laptop might reveal a compromised account used for exfiltration.
  •  Token Lifecycle Analytics – By tracking token issuance, usage frequency, IP variance, and expiry patterns, defenders can identify misuse, such as tokens repeatedly used seconds before expiration or from IPs in different countries.
  •  Behavioral Baselines – A typical user might access the API twice daily from the same IP. When that pattern changes—say, 100 requests from 5 IPs overnight—it’s a strong anomaly signal.
  •  Anomaly-Driven Alerting – Instead of relying only on known indicators of compromise, defenders can leverage behavioral models to identify new threats. A sudden surge in API calls at 3 AM may not break thresholds but should trigger alerts when contextualized.

 Build the Foundation Before You Scale

Start simple, but start smart:

1. Inventory Everything – Use API gateways, WAF logs, and network taps to discover both documented and shadow APIs. Automate this discovery to keep pace with change.
2. Log the Essentials – Capture detailed logs including timestamps, methods, endpoints, source IPs, tokens, user agents, and status codes. Ensure these are parsed and structured for analytics.
3. Integrate with SIEM/XDR – Normalize API logs into your central platforms. Begin with the API gateway, then extend to application and infrastructure levels.

Then evolve:

 Deploy rule-based detections for common attack patterns like:

  •  Failed Logins: 10+ 401s from a single IP within 5 minutes.
  •  Enumeration: 50+ 404s or unique endpoint requests from one source.
  •  Token Sharing: Same token used by multiple user agents or IPs.
  •  Rate Abuse: More than 100 requests per minute by a non-service account.

 Enrich logs with context—geo-IP mapping, threat intel indicators, user identity data—to reduce false positives and prioritize incidents.

 Add anomaly detection tools that learn normal patterns and alert on deviations, such as late-night admin access or unusual API method usage.

 The Automation Opportunity

API defense demands speed. Automation isn’t a luxury—it’s survival:

  •  Rate Limiting Enforcement that adapts dynamically. For example, if a new user triggers excessive token refreshes in a short window, their limit can be temporarily reduced without affecting other users.
  •  Token Revocation that is triggered when a token is seen accessing multiple endpoints from different countries within a short timeframe.
  •  Alert Enrichment & Routing that generates incident tickets with user context, session data, and recent activity timelines automatically appended.
  •  IP Blocking or Throttling activated instantly when behaviors match known scraping or SSRF patterns, such as access to internal metadata IPs.

And in the near future, we’ll see predictive detection, where machine learning models identify suspicious behavior even before it crosses thresholds, enabling preemptive mitigation actions.

When an incident hits, a mature API response process looks like this:

  1.  Detection – Alerts trigger via correlation rules (e.g., multiple failed logins followed by a success) or anomaly engines flagging strange behavior (e.g., sudden geographic shift).
  2.  Containment – Block malicious IPs, disable compromised tokens, throttle affected endpoints, and engage emergency rate limits. Example: If a developer token is hijacked and starts mass-exporting data, it can be instantly revoked while the associated endpoints are rate-limited.
  3.  Investigation – Correlate API logs with endpoint and network data. Identify the initial compromise vector, such as an exposed endpoint or insecure token handling in a mobile app.
  4.  Recovery – Patch vulnerabilities, rotate secrets, and revalidate service integrity. Validate logs and backups for signs of tampering.
  5.  Post-Mortem – Review gaps, update detection rules, run simulations based on attack patterns, and refine playbooks. For example, create a new rule to flag token use from IPs with past abuse history.

 Metrics That Matter

You can’t improve what you don’t measure. Monitor these key metrics:

  •  Authentication Failure Rate – Surges can highlight brute force attempts or credential stuffing.
  •  Rate Limit Violations – How often thresholds are exceeded can point to scraping or misconfigured clients.
  •  Mean Time to Detect (MTTD) and Mean Time to Respond (MTTR) – Benchmark how quickly threats are identified and mitigated.
  •  Token Misuse Frequency – Number of sessions showing token reuse anomalies.
  •  API Detection Rule Coverage – Track how many OWASP API Top 10 threats are actively monitored.
  •  False Positive Rate – High rates may degrade trust and response quality.
  •  Availability During Incidents – Measure uptime impact of security responses.
  •  Rule Tuning Post-Incident – How often detection logic is improved following incidents.

 Final Word: The Threat is Evolving—So Must We

The state of API security is rapidly shifting. Attackers aren’t waiting. Neither can we. By investing in foundational visibility, behavioral intelligence, and response automation, organizations can reclaim the upper hand.

It’s not just about plugging holes—it’s about anticipating them. With the right strategy, tools, and mindset, defenders can stay ahead of the curve and turn their API infrastructure from a liability into a defensive asset.

Let this be your call to action.

More Info and Assistance by Leveraging MicroSolved’s Expertise

Call us (+1.614.351.1237) or drop us a line (info@microsolved.com) for a no-hassle discussion of these best practices, implementation or optimization help, or an assessment of your current capabilities. We look forward to putting our decades of experience to work for you!  

 

 

* AI tools were used as a research assistant for this content, but human moderation and writing are also included. The included images are AI-generated.

Audio Blog Post: Moving Toward Detection in Depth

Brent Huston, CEO and Security Evangelist for MicroSolved, Inc., explains how organizations need to move from a focus on prevention to detection.

Joined by MSI’s Account Executive Chris Lay and Marketing Communication Specialist Mary Rose Maguire, Brent maps out how an organization can get detective controls closer to the data and shows that IT departments can have a “payoff” if they pursue nuanced detection.

Click here to listen to the audio post!

Discuss Detection in Depth at CMH ISSA Summit

 

 

On May 18th, I will be presenting on detection in depth at the CMH ISSA Summit. I look forward to a good discussion of the ideals, organizational needs, and maturity models. Given all of the focus on re-allocating resources from “prevention only” strategies to an equal spread across the core values of prevention, detection and response, this is likely to be a useful discussion to many organizations.

Come ready with good questions. I will also be available throughout the Summit for break-out discussions, one-on-ones, and small team meetings. Please reach out via email, phone or Twitter to schedule a sit down. Otherwise, feel free to approach me in the halls and we can have an ad-hoc discussion if you want to learn more about specific detection in depth approaches.
 
I speak on Friday, May 18th at 11:15 am. I hope to see you there!

Business of Security Webcast Featuring Brent Huston: December 7

Join the Business of Security to hear from Brent Huston, recent winner of (ISC)2 Information Security Leadership Award, who will lay out the need for and principles of performing detection in depth. Brent, CEO and Security Evangelist of MicroSolved, will share his research and hands-on experience that validates the leading approach for detecting threats against your most precious assets.

When: Wednesday, December 7th, Noon EDT
Where: GoToWebinar
Cost: Complimentary Register to attend live or to receive the event archive information for on-demand viewing at: http://www.businessofsecurity.com/

You’ll learn:

  • Huston’s postulate and why location matters
  • The detection in depth maturity model
  • The detection in depth focus model
  • Tools and approaches for doing detection in depth

Brent’s contribution to the community was recognized by (ISC)2 for employing the HoneyPoint Internet Threat Monitoring Environment (HITME) to alert critical infrastructure organizations whose machines are compromised. MSI provides pro-bono services to help them to mitigate the compromise and manage the threat.

Earn (1) CPE Group A credit for the CISSP and SSCP: This event meets the criteria for a Continuing Professional Education (CPE) activity for the Information Security and Risk Management domain.