---
id: 7772
title: "Exploiting Second Order SQL Injection with Stored Procedures"
source_domain: netspi.com
source_url: "https://www.netspi.com/blog/technical-blog/web-application-pentesting/second-order-sql-injection-with-stored-procedures-dns-based-egress/"
published_at: "2024-12-22T00:00:00Z"
tags: ["sql-injection", "second-order", "oob", "web-pentesting", "stored-procedures", "xp-dirtree", "dns-exfiltration"]
phying_url: "https://phying.com/item/7772"
lang: en
---

# Exploiting Second Order SQL Injection with Stored Procedures

## Summary

This walkthrough covers exploiting second-order SQL injection in an Excel report export feature, chaining stored procedure UNC path injection via xp_dirtree to exfiltrate database details over DNS.

## Intelligence Metadata

- **Sources:** netspi.com
- **Published:** 2024-12-22T00:00:00Z
- **Original:** https://www.netspi.com/blog/technical-blog/web-application-pentesting/second-order-sql-injection-with-stored-procedures-dns-based-egress/
- **Phying News:** https://phying.com/item/7772
