Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:05:39+00:00 2026-05-28T17:05:39+00:00

Sometimes SQL Inject queries may come in a disguise by using a different character

  • 0

Sometimes SQL Inject queries may come in a disguise by using a different character set that you are used to. But even in those disguise modes, the query string would still include familiar words such as union and cast and varchar etc..

My question is this;

Is it possible to even disguise those words too? In other words, could “union” or “cast” be disguised as well?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:05:40+00:00Added an answer on May 28, 2026 at 5:05 pm

    The SQL standard requires that keywords use Latin characters A through Z or a through z, digits 0 through 9, and specific special characters. See SQL Language Elements in "SQL-99 Complete, Really".

    That said, individual implementations (e.g. Oracle, Microsoft SQL Server, MySQL) may not conform to the standard perfectly. The best way to be sure is to test the brand and version of RDBMS you use.


    Re your comments: MySQL allows /* */ comments to be embedded within keywords, but in other brands of databases, an inline comment is more or less like whitespace.
    So SEL/* */ECT is like SEL ECT which of course is not a valid keyword so it would fail.

    I assume that comment delimiters must also be characters in the ascii range, but I have not tested this to be sure. And it could vary by brand of RDBMS depending on implementation. So the answer must take that into account (hint: you haven’t told us what brand of database you’re using).

    Another type of "disguise" could be URL encoding. That is, using HTML entities or HTML hex-encoding for individual characters. SQL won’t recognize these, but if you filter raw inputs before decoding, something could slip past your checks.

    Ultimately, my policy for the best practice is:

    • Never let user input be run as code (this also applies to any untrusted content read from a file or even from the database itself). Use parameterization or at least a dependable escaping function instead of interpolating content directly into SQL strings.

    • Parameterization doesn’t help if you want to make other parts of your SQL dynamic based on user input. For instance, letting the user choose how to sort their result:

        SELECT * FROM MyTable ORDER BY $ColumnOfUsersChoice $AscVsDesc
      

    In that case my practice is to use whitelisting, so we compare the user input against a fixed set of valid choices, instead of trying to use pattern-matching with regular expressions. The advantage of whitelisting is that if a malicious user tries anything clever, their input will simply be ignored.

    For examples of whitelisting, see my presentation SQL Injection Myths and Fallacies or my book SQL Antipatterns Volume 1: Avoiding the Pitfalls of Database Programming.

    Here’s a video recording of me presenting the SQL Injection Myths and Fallacies talk: http://marakana.com/forums/web_dev/general/210.html But I continue to improve the slides since that video was made, so there will be some differences.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes one when creating SQL queries one assumes that one of the Index should
I've got some LINQ to SQL that sometimes throws a Cannot insert duplicate key
When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to
Sometimes you have to write some of your queries in native SQL rather than
I have a website using Microsoft SQL 2008 server over local network. Sometimes, SQL
I'm working on a C# app that uses SQL 2008 express. Sometimes I work
I am using SqlDataReader to read data from SQL Server. However sometimes I want
I need to export some data using SQL Server 2000's BCP utility. Sometimes my
I sometimes need to see what SQL statement SubSonic generates. That works great with:
Sometimes the exception returns something like: ORA-06502: PL/SQL: numeric or value error: character string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.