Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "hvae" typo and stuff #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions SQL Injection Vulnerabilities.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- https://github.com/bertwagner/SQLServer/blob/master/SQL%20Injection%20Vulnerabilities.sql

-- How to search your database for SQL Injection vulnerabilities
-- It's very difficult to find with 100% accuracy vulnerabilities, but we can do our best
-- Searches stored procedures, udfs, views for parameter plus + sign for concatenation as well as exec or usp_exec
-- It's very difficult to find vulnerabilities with 100% accuracy, but we can try our best.
-- Searches stored procedures, udfs, views for parameter and "+" sign for concatenation, as well as "exec" or "usp_exec"
-- check for things that don't use quotename

-- Why is finding vulnerabilities important? Because at the end of the day, if data is lost or leaked, you are the one to blame.
Expand Down Expand Up @@ -33,14 +33,13 @@ WHERE
CHAR(12),''),CHAR(13),''),CHAR(14),''),CHAR(160),''),' ','')
LIKE '%+@%'
AND
( -- Only if executes a dynamic string
( -- Only if it executes a dynamic string
r.Definition LIKE '%EXEC(%'
OR r.Definition LIKE '%EXECUTE%'
OR r.Definition LIKE '%sp_executesql%'
);


-- Search for parameters that look like they could hvae injection values in them
-- Search for parameters that look like they could have injection values in them!

WITH XMLNAMESPACES (DEFAULT 'http://schemas.microsoft.com/sqlserver/2004/07/showplan')

Expand Down