August 29th, 2024

Bypassing airport security via SQL injection

A security vulnerability in the FlyCASS system allowed unauthorized access to TSA's KCM and CASS. Researchers reported it, leading to system disablement, but TSA provided misleading statements about security measures.

Read original articleLink Icon
OutrageDisbeliefFrustration
Bypassing airport security via SQL injection

A significant security vulnerability was discovered in the Known Crewmember (KCM) and Cockpit Access Security System (CASS) used by the TSA, which allows airline employees to bypass security screening. Researchers Sam Curry and Ian Carroll found that the FlyCASS system, which manages KCM and CASS for various airlines, was susceptible to SQL injection attacks. This flaw enabled unauthorized users to log in as administrators and add any individual as an authorized user, granting them access to secure areas without proper screening. The researchers reported the issue to the Department of Homeland Security (DHS) on April 23, 2024, which acknowledged the severity of the problem and subsequently disabled FlyCASS from KCM/CASS. However, the TSA issued misleading statements regarding the vulnerability, claiming that a vetting process was in place for KCM barcodes, despite evidence that manual entry of employee IDs was still possible. The researchers attempted to engage with DHS for a safe disclosure process but faced communication challenges. The timeline of events indicates a lack of responsiveness from the TSA regarding the vulnerability's implications. The incident highlights critical flaws in the security protocols surrounding airline employee access to sensitive areas.

- A SQL injection vulnerability was found in the FlyCASS system, allowing unauthorized access to KCM and CASS.

- Researchers reported the issue to DHS, which confirmed the seriousness and disabled FlyCASS from KCM/CASS.

- The TSA issued incorrect statements about the vulnerability, denying the possibility of bypassing security.

- The incident underscores significant flaws in the security measures for airline employee access.

- Communication issues arose during the disclosure process, complicating resolution efforts.

AI: What people are saying
The comments on the TSA security vulnerability reveal widespread concern and criticism regarding the incident and the agency's response.
  • Many commenters express disbelief that such a basic SQL injection vulnerability could exist in a critical security system.
  • There is a strong sentiment that the TSA's response was inadequate and dismissive, with accusations of cover-up and negligence.
  • Commenters worry about potential repercussions for the researchers who reported the vulnerability, fearing legal action under the CFAA.
  • Several users highlight the systemic issues within the TSA and the broader implications for national security.
  • Many call for greater accountability and transparency from government agencies regarding cybersecurity practices.
Link Icon 62 comments
By @woodruffw - 5 months
The TSA's response here is childish and embarrassing, although perhaps unsurprising given the TSA's institutional disinterest in actual security. It's interesting to see that DHS seemingly (initially) handled the report promptly and professionally, but then failed to maintain top-level authority over the fix and disclosure process.
By @dylan604 - 5 months
Since they actually went past the SQL injection and then created a fake record for an employee, I'm shocked that Homeland did not come after and arrest those involved. Homeland would have been top of the list to misinterpret a disclosure and prefer to refer to the disclosure as malicious hacking instead of responsible disclosure. I'm more impressed by this than the incompetence of the actual issue.
By @jerf - 5 months
You know it's bad when it's so bad that as I write this no one has even bothered talking about how bad storing MD5'd passwords is. This even proves they aren't even so much as salting it, which is itself insufficient for MD5.

But that isn't even relevant when you can go traipsing through the SQL query itself just by asking; wouldn't matter how well the passwords were stored.

By @urbandw311er - 5 months
> We did not want to contact FlyCASS first > as it appeared to be operated only by one person > and we did not want to alarm them

I’m not buying this. Feels more like they knew the site developer would just fix it immediately and they wanted to make a bigger splash with their findings.

By @voiceblue - 5 months
Not surprised that they deny the severity of the issue, but I am quite surprised they didn't inform the FBI and/or try to have you arrested. Baby steps?
By @justmarc - 5 months
A good old SQL injection negates the entire security theatre worth probably billions a year, hilarious, but probably not all too surprising.
By @mikeocool - 5 months
> We did not want to contact FlyCASS first as it appeared to be operated only by one person...

It seems pretty remarkable that airlines are buying such a security sensitive piece of software from a one person shop. If you make it very far into selling any piece of SaaS software to most companies in corporate America, at the absolute minimum they're going to ask you for your SOC2 audit report.

SOC2 is pretty damn easy to get through with minimal findings as far as audits go, but there are definitely several criteria that would should generate some red flags in your report if the company is operated by a single person. And I would have assumed that if your writing software that integrates with TSA access systems, the requirements would be a whole lot more rigorous than SOC2.

By @preciousoo - 5 months
This was a wild read, that something like this could be so easy, but the later part describing the TSA response is incredibly alarming
By @magic_man - 5 months
The dudes who did this are going to probably be visited by homeland security or FBI. Not sure what they thought they will get out of this. I don't think the government cares about security, but they are vengeful.
By @mariodiana - 5 months
So, the trick here would be to purchase a ticket with a major airline, pack a no-no in your carry-on, and then bypass TSA security by adding yourself to the Known Crew Member list of a small airline using the third-party FlyCASS system, via the SQL-injection. You'd then board the major airline with the no-no. Is that the vulnerability?
By @4gotunameagain - 5 months
The safety of airports and air travel compromised by a simple SQL injection ?

What is it, the year 2000 ?

It should be a criminal offence for whoever developed that system.

By @yard2010 - 5 months
I wouldn't get myself into this honestly. Wrong turn and you're a terrorist. Especially with how crooked and backward the people responsible for it seem.
By @0xbadcafebee - 5 months
Very brave of them to report this. They're likely on no-fly lists for life now, and will probably be investigated by the FBI. The government does not like to be embarrassed.
By @robswc - 5 months
What mind-melting levels of incompetency. I would love to suggest pay raises so the Government can hire better individuals... but I worry the problem is so systemic it wouldn't do any good.

Everyone dropped the ball... and kept dropping it. The part where its handed to them on a silver platter and its essentially smacked away. Maddening.

By @dtx1 - 5 months
> 05/17/2024: Follow-up to DHS CISO about TSA statements (no reply)

> 06/04/2024: Follow-up to DHS CISO about TSA statements (no reply)

There should be a public Shitlist of Organisations that don't get the Benefit of Responsible Disclosure anymore, just a Pastebin drop linked to 4chan.

By @qwertox - 5 months
Straight to jail, if this would have happened in Germany.

The TSA would have been the one suing you and would easily win.

By @dhx - 5 months
Why does KCM still need to exist? It doesn't help airlines nor air crew:

Pilot: "Years ago we’d get a random enhanced check (which just means go to TSA precheck) now and then. These days it’s 60% of the time, so it’s not possible to get a whole crew through KCM anymore, and we wait on each other because the jet can’t be boarded until the flight attendants are ALL through security, and with the 2022/2023 KCM random checks being so high, that just doesn’t happen. Honestly, I rarely use KCM anymore. I just walk through TSA precheck. The odds are we’re going there anyway so just cut to the chase and hit precheck."[1]

VIP treatments (including the likes of KCM) should be removed no matter if someone is a prime minister[2], media personality[3] or airline CEO. In this way, VIPs can experience the inadequate security processes and staffing levels that everyone else has to deal with, and hopefully with their louder voices will be able to force airports and government agencies to improve the situation for all.

[1] https://www.quora.com/As-a-pilot-how-does-it-feel-like-to-ha...

[2] https://www.theage.com.au/national/red-faces-as-nz-leader-ge...

[3] https://www.smh.com.au/traveller/travel-news/louise-milligan...

By @lubujackson - 5 months
Meanwhile, my wife just had a beautiful ameythyst she bought as a birthday gift for my son stolen by security in Mexico because it "could be used as a weapon". I say stolen because they wouldn't throw it away and just smirked the whole time at her.

It is sadly an all-too-common occurence when you give uneducated dimwits police-level power with no oversight and no recourse for anyone affected. I assume flexing government power is the real objective here since everybody knows that security is not.

By @wkirby - 5 months
Honestly, this is the most shocking part:

> We did not want to contact FlyCASS first as it appeared to be operated only by one person and we did not want to alarm them

It’s incredible (and entirely too credible) that this kind of “high security” integration could be built in such an amateur way: and a good reminder why government projects often seem to be run with more complexity than your startup devs might think is necessary.

By @jrochkind1 - 5 months
> We had difficulty identifying the right disclosure contact for this issue. We did not want to contact FlyCASS first as it appeared to be operated only by one person and we did not want to alarm them.

Wait, what? Is this a euphemism for they didn't believe they would take it seriously? Reporting it over their heads to DHS was probably not less "alarming" to anyone...

By @lysace - 5 months
> KCM is a TSA program that allows pilots and flight attendants to bypass security screening, even when flying on domestic personal trips.

This program seems like the root cause of the security issue.

(Outside of the US) I've often gone through security screenings just before or after crew groups in fast track, but otherwise normal security screening lanes.

By @qazxcvbnmlp - 5 months
Accessing CASS is a big deal, and should be fixed but you’re gonna need more than this to board an aircraft.

Also… you can fix all the SQL issues, but you’re still not going to be able to fix the “men in hoodies with a big wrench talk to an authorized administrator (while their kids are kidnapped in Mexico)”

By @system2 - 5 months
I feel like TSA is downplaying it to avoid public backlash. This is not childish or amateur. They are just doing what any government agency would do. If you speak up louder you will get arrested or screwed by some random agency knocking on your door, FYI.
By @SG- - 5 months
i wonder if TSA will audit the entire list, also it opens up more questions too like how long accounts remain active? are they simply assuming each airline will update pilot status? they clearly haven't been treating this sytem as important it seems.
By @eduction - 5 months
I’m glad they uncovered and reported this but I’d be super reluctant to actually log in using purloined credentials if I were them. As macNchz says elsewhere in this discussion, CISA/TSA/DHS does not appear to make any assurances that they won’t prosecute what appears to be a facial CFAA violation just because someone is doing valid security research.

To be clear, I really hope they don’t, but they are also clearly trying to spin this in a way at odds with the researchers, and I’d hate to be in a position where they want to have leverage over me if I’d done this.

Brave that they did so though and I do think the severity of the vuln warrants this.

By @stuff4ben - 5 months
Security Theatre 3000... keeping us entertained
By @fennecbutt - 5 months
It's a stupid system anyway. Corrupt airline staff can easily bypass all security checks, bring a pistol in a handbag and leave that in the cabin luggage bin for prearranged pickup by an unscrupulous passenger or any sort of shenanigans.

How do they protect against corrupt staff. It's like they're not even thinking. Why don't they just fast track staff checks.

By @adamsb6 - 5 months
What’s so special about bar codes that the testers couldn’t create one themselves?

Are they cryptographically signed by a system that was inaccessible?

Or is it just a matter of figuring out the bar code format and writing out some KCM id?

By @Dove - 5 months
I can't find the essay now, but I remember reading something from years and years ago: Bruce Schneier arguing that it made sense for airline pilots to go through security with everyone else, in spite of the silly appearance, because the inherent complication in implementing a two tier system would both eat up efficiency gains and unavoidably introduce security flaws.

He convinced me at the time, but I wasn't expecting such an on-the-nose demonstration.

By @tbarbugli - 5 months
Makes you wonder why there were no plane hijacks since 9/11. TSA does not seem a credible prevention mechanism given how easy it is to go around it.
By @radium3d - 5 months
Part of the issue here may be the policy of "need to know" for these high profile secret systems. If the only person who "needs to know" doesn't know what they're doing then the proper audits of the code will never be done.
By @lapphi - 5 months
I wonder how many entities knew about this before today
By @mdorazio - 5 months
Does anyone know how the KCM barcodes differ from employee IDs? Seems like TSA is indexing pretty heavily on those.
By @mvkel - 5 months
While this report is embarrassing for all involved, in a practical sense, I'd argue the security of this app was "fine."

What I mean: security through obscurity is imo the best situation to be in. You can't attack something if you don't know it exists in the first place. That alone gives this system a leg up over more exposed (but hardened) platforms.

Second, convenience always beats secure. Requiring password rotations is worse than requiring none at all, because people tend to find the path of least resistance (writing a password on a notepad instead of memorizing).

If it was faster/easier to ship a useful (but vulnerable) app, that's net better than the app not shipping at all because of security hurdles. I have to imagine sanitizing inputs doesn't take much more time to include, but I don't know the systems involved.

Ultimately, what damage was experienced here? We can throw out hypotheticals about what -could- have happened, but you can't sue every driver on the road because they -could- have hit you.

An insecure system served a useful purpose for years, got more secure, and continues ticking.

By @h_tbob - 5 months
Guys, I think you should not have done this. You can really piss a lot of people off doing that kind of stuff.
By @77pt77 - 5 months
Why do people even attempto to disclose this?

These guy are going to end up with some serious federal charges.

By @bahmboo - 5 months
Other issues aside my biggest takeaway is that no one at TSA employed even the most basic auditing of external systems accessing their secure process.
By @chihwei - 5 months
Well, government is being government. I never think bureaucracy could solve an issue when they could just hide it.
By @cratermoon - 5 months
Of course the worst part is TSA and Homeland Security trying to sweep everything under the rug and ignoring the problem.
By @tonymet - 5 months
this isn't a "weakest link breaks the chain" this is a chain with 10000 weak links and we found one.
By @gsanderson - 5 months
Like something you'd see in a movie and think "well, that could never really happen". Yikes.
By @killjoywashere - 5 months
Love reading this while sitting in the MCO terminal waiting to go home after the fourth non-stop flight in a week.
By @OneLeggedCat - 5 months
... and that was the last time Ian was allowed to fly without a printed boarding pass with SSSS on it.
By @ppeetteerr - 5 months
How is this a thing in 2024?
By @bigmattystyles - 5 months
Honestly, if I discovered and reported this, I'd be so scared of being charged with a crime under the CFAA or some other statute, there are just too many high profile faces that can be covered with egg here.

(edit) the charging guidelines are somewhat re-assuring but still https://www.justice.gov/opa/pr/department-justice-announces-...

By @systemvoltage - 5 months
If NYTimes or WSJ had any backbone or journalistic integrity, they would write a front page piece on this to fix our agencies from being defensive to bug reports, shed light to the horrid incompetency in these agencies and how there was no oversight to any of this. They would also protect the two individuals as white hat hackers and teach non-technical people that these are good guys. You know, the job of the press.
By @mhh__ - 5 months
SQL injection, a real blast from the past, like a child with mumps
By @thomasfl - 5 months
Little Bobby Tables' story is still a valuable lesson.
By @harha_ - 5 months
How can this even be possible? What the hell...
By @invalidlogin - 5 months
Who else emailed this to Frank Abagnale?
By @sergiotapia - 5 months
yeah i would not mess around with this and get put into a for-life no fly list dude. you even wrote data to the prod system, christ!
By @rekoros - 5 months
Great work and writing - thank you!
By @d4mi3n - 5 months
Bobby Tables strikes again!

https://xkcd.com/327/

I’m continually amused, amazed, and exasperated at how classes of software defects older than I am continue to be a problem.

By @UniverseHacker - 5 months
Hilarious that the entire TSA system is vulnerable to the most basic web programming error that you generally learn to avoid 10 minutes into reading about web programming- and that every decent quality web framework automatically prevents.

It is really telling that they try to cover up and deny instead of fix it, but not surprising. That is a natural consequence of authoritarian thinking, which is the entire premise and culture of the TSA. Any institution that covers up and ignores existential risks instead of confronting them head on will eventually implode by consequences of its own negligence- which hopefully will happen to the TSA.

By @samch - 5 months
Little Bobby Tables strikes again:

https://xkcd.com/327/

By @radium3d - 5 months
Lol, that's the oldest trick [fail?] in the book
By @bambax - 5 months
This shows that anyone with the slightest motivation to do harm would have zero difficulty replaying 911.

The reason there aren't more terrorist attacks isn't because various security agencies around the world protect us from them. It's because there are extremely few terrorists.

By @hypeatei - 5 months
I hate the TSA with every ounce of my being and these articles reinforce why. Incompetent and useless agency that only serves to waste people's time. Can't believe it still exists; 9/11 and the Bush administration really did a number on this country.
By @xyst - 5 months
TSA is a $10.4B [1] security theater and mistake born out of fear.

Out of that multibillion dollar budget, TSA allocates $10.4M for “cybersecurity staffing, as well as the development and implementation of enhanced cybersecurity-related measures to improve cyber resiliency across the U.S. Transportation Systems Sector.”

Glad to see our tax dollars working so effectively! \s

What a joke of a country this is

[1] https://www.tsa.gov/news/press/testimony/2023/03/29/fiscal-y...

By @rez0__ - 5 months
> Now that we are an administrator of Air Transport International...

LOL

> Unfortunately, our test user was now approved to use both KCM and CASS

smh...

By @hbrmjen - 5 months
Xnxnxnkzjzmxnnzcskdyxk buenos días amor cómo amaneciste mi cielo bello como te fue en el estudio shdtdhdc te e dicho algo y me avisas cuando llegues a tu casa para ti gracias a Dios por tu salud te amo mucho en el trabajo de dgd Je je pero no sé dónde es eso de las cosas y te sientes por usted es que no me avisas cuando te e udbgzdh si te amo más extremo de