I was listening to an episodePauldotcom, And Mick mentioned something about attacks on systems via barcode. because of the nature of barcodes, developers may not be expecting attacks from that vector and thus don't sanitize their inputs properly. I had previusly written"XSS, Command and SQL Injection vectors: Beyond the Form"So this was right up my alley. I constructed this page that lets you make barcodes in Code 93, Code 39, Code 39ext and Code 128A, B and C. I got the PHP librariesFrom these folks, Which seem to be free for non profit use. if you dont give input to the form, the page just shows barcodes that can be useful for sort of "fuzzing" a system to see if the input is properly sanitized. if you have problems getting them to scan, adjust the bar size. the default tests are as follows:
<Script> alert ("test") </script> |
This is of course the canonical XSS attack, for more interesting ones asp-top-5-louisville ">See here |
Or 1 = 1 -- |
The canonical SQL injection attack |
|
Just a single quote to see if SQL queries break |
-- |
Common SQL comment to see if queries break |
" |
Just a normal quote to see if SQL queries break |
> |
Lets see if HTML breaks |
< |
Same as abve, but opposite .:) |
Cant print this |
ASCII characters 31-16 for fuzzing to see what breaks |
Cant print this |
ASCII characters 15-0 |
Please only use on your own barcode reading system. by the way, please just ignore Clippy if you see him, he has to do with my IDS testing from before. if you want to make your own custom barcodes type in your string in the text area below, choose your options, and hit submit. if you just want to recode my bar codes leave the text area blank, choose your options, and hit submit. you can also type the decimal equivalent ASCII values as comma separated string, and it will ignore what is in the textarea.
If you want to just play around with individual characters, checkout ourASCII barcode chart.
Text Block:
Ascii dec (comma separated ):
Barcode Size: 1 2 3URL Encode it: Return a more printable version:
Code 93
Code 39(Always URL encoded, or double encoded, otherwise it cant make the characters)
Code 39 Extended