In reality, that isnt quite the case.
Attempting to gain unauthorized access to the onboard networks of a commercial aircraft violates federal law.
He further said that they did this to detect traffic crossing the networks and unearth susceptibilities.
source: www.techworm.net