It happened. Someone told me a website was invulnerable.
Coincidentally, since it also happened to belong to a highschool, I took it as a challenge, obtained permission to find flaws in it and have found some pretty serious ones later on. The flaws have since been patched.
SQL Injection (SQLi) is a vulnerability which allows an attacker to inject malicious code into SQL statements.
When using such a vulnerability, an attacker may be able to create, update and delete database information.
It is one of the most common web hacking techniques.
In the reconnaissance phase, which is a preparation phase when a potential attacker seeks to gather information about the target, I noticed an ID in the URL.
I started probing for SQL injection, and was greeted by a blank page.
Lets break it down..:
SELECT * FROM table WHERE something = ‘1’;
SELECT * FROM table WHERE something = ‘1”;
I started out with adding “OR 1=2” to the URL just to find out that the request would get blocked. Bummer.
However, just a few weeks ago I was teaching myself boolean-based SQL injection, so I decided to give it a try..
After a couple of queries have failed, I decided to would try one last time before giving up and my query quickly became “and ascii(substring((SELECT concat(username,0x3a,password) FROM user LIMIT 0,1),1,1))>96”
It executed. The page loaded normally.
However, when I used “and ascii(substring((SELECT concat(username,0x3a,password) FROM user LIMIT 0,1),1,1))<1” I was greeted by a blank page.
Lets break it down once again..:
In theory, by using this payload and changing the charcode and substring start positions an attacker could extract all of the usernames and the corresponding password hashes from the database. Not good.
When I found this, I was excited and decided to search for more flaws.
I found another one almost instantly. It was CSRF.
Cross-Site Request Forgery (CSRF) is an attack that forces a user to execute unwanted actions when they’re logged in to a web application.
As I saw that the website had a page that allowed users to change their passwords my first thought was that it might be vulnerable to CSRF – turns out I was correct.
I quickly realized that it’s possible to chain these two vulnerabilities (SQLi & CSRF) together. Here’s how:
Then i dug deeper and stumbled upon CodoLogic‘s FreiChat..
FreiChat instantly caught my attention:
Hardcoding passwords is the process of embedding plain text passwords into the source code.
It would appear that FreiChat had done just that which is never good, so, thinking there might be another flaw, I visited CodoLogic’s website, downloaded the recent version (11.0) of the software in question and sure enough, I found a reflected XSS..
Reflected Cross-Site Scripting (XSS) is a vulnerability where a malicious script is part of the request which is sent to the web server and reflected back in such a way that the HTTP response includes the payload.
I reported my findings to CodoLogic, they have confirmed the flaw exists and clarified it will be fixed in their upcoming releases.
It is important to note that the flaw only affected FreiChat 11.0 – newer versions of the software (the current is 11.1 at the time of writing) remain unaffected.
CodoLogic’s team have reacted to my report within minutes which in my experience is unusual, so kudos to them!
That’s it for the first part of the article, in the upcoming blog posts I’ll cover these vulnerabilities even more explaining how they work and how they can be mitigated.
Come October 15th, a new conference will shine on the database spotlight – its title…
Come next month, I’ll be speaking at CFCamp 2025 in Munich. Here are my thoughts…
This blog will walk you through some lessons for conference speakers who speak remotely no…
Insecure data storage is the second vulnerability in the OWASP Mobile Top 10 list. Insecure…
The improper platform usage vulnerability is the first vulnerability in the OWASP Mobile Top 10.…
If you ever heard of web application security, you probably heard of OWASP. And if…
View Comments
Quality posts is the key to interest the visitors to pay a
visit the site, that's what this website is providing.
Thank you!
Hello are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started
and create my own. Do you require any coding expertise to make your own blog?
Any help would be greatly appreciated!
Yes, I am using WordPress for this site.
A blog doesn't really require any coding expertise to make.
Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is important and everything.
However think of if you added some great images or
video clips to give your posts more, "pop"! Your content is excellent but with images and clips, this website could undeniably
be one of the very best in its field. Terrific blog!
Thank you! I have actually considered adding videos and other stuff to my blogs, never have I actually done that though. Guess I'll have to try and see how that goes!
Firt of all I want to say awesome blog! I had a quick question that
I'd like to ask if you don't mind. I was curious to find out how you center yourself
and clear your thoughts prior to writing. I've had a difficult time clearing mmy mind in getting my thoughs ouut there.
I do tazke pleasure in writing however it juust seems like the fkrst 10to 15 minutes are generally lost just trying
to figure out how to begin. Any suggestions or hints? Thanks!
I just tend to come up with an idea and make a draft out of it, then edit the draft, add some more content to it and eventually publish it.
Thank you for the good writeup. It in truth was a entertainment account it.
Glance complicated to more added agreeable from you!
By the way, how can we keep up a correspondence?
I can be reached by email at lukas@lukasvileikis.com.
Uplink is by-far my favorite hacker recreation thus far.
We absolutely love your blog and find the majority
of your post's to be just what I'm looking for. Does one offer guest writers to write
content in your case? I wouldn't mind writing a post or elaborating on many of the
subjects you write concerning here. Again, awesome web log!
Excellent, what a webpage it is! This weblog gives valuable data to us, keep it up.
Thank you, I will definetly write more!
Fantastic goods from you, man. I've understand your stuff
previous to and you are just too excellent. I actually like what you've acquired here, certainly like what you're statig and the way in which you say it.
You make it enjoyable and you still take care of to keep it wise.
I can't wait to read far more from you. This is actually a terrific
site.
Thank you, that means a lot to me!
This piece of writing gives clear idea for the
new visitors of blogging, that truly how to do blogging.