17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 – Obfuscation-- Grant permissions to viewGRANT SELECT ON dbo.vwRandomTO Sensitive_high, Sensitive_medium, Sensitive_low;GOListing 8-1: Generating random numbers using RAND.Now, we can obtain a random number in any user defined function with asimple call to our new view. In Listing 8-2, an example is provided thatproduces a random number between the values of 1 and 100.DECLARE @Rand float;DECLARE @MinVal int;DECLARE @MaxVal int;SET @MinVal = 1;SET @MaxVal = 100;SELECT@Rand = ((@MinVal + 1) - @MaxVal) * RandomValue +@MaxValFROMdbo.vwRandom;GOListing 8-2: Testing the View.Appendix A of this book provides a syntax reference for the RAND systemfunction.Character ScramblingCharacter scrambling is a process by which the characters contained within agiven statement are re-ordered in such a way that its original value isobfuscated. For example, the name "Jane Smith" might be scrambled into"nSem Jatih".This option does have its vulnerabilities. The process of cracking a scrambledword is often quite straightforward, and indeed is a source of entertainment formany, as evidenced by newspapers, puzzle publications and pre-movieentertainment.Cracking a scrambled word can be made more challenging by, for example,eliminating any repeating characters and returning only lower case letters.174

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!