Hello.
Just taking a deviation from the KMDF drivers and sharing a writeup for the challenge “GGs” in Hack-a-Sat 4. GGs was a part of “Aerocapture the Flag”. There were a total of 4 challenges in this category, all of them focused on Orbital Mechanics problems.
Hack-a-Sat(ellite)?
Hack-a-Sat is an annual CTF competition that focuses on Satellite Exploitation. The challenges range from mathematical problems in Astrodynamics, Orbtial Mechanics, and other categories such as pwn and rev but with a flavour of space :).
The challenges were interesting and difficult. With NASA announcing the astronauts for Artemis II, space is in the air!
This was the qualification round. The finals will be held at DEFCON 23.
The Challenge
The challenge involved maintaining direction of a radio antenna on a satellite, within 10° of NADIR.
You need to connect to challenge using netcat nc ggs.quals2023-kah5Aiv9.satellitesabove.me 5300
would prompt for the ticket. Upon entering that we get the following prompt ->
|
|
So here’s our challenge, let’s see what we can do!
Approach
Based on the information provided, the initial orientation of the satellite is already aligned with the NADIR and has an angular velocity matching the Earth’s rotation. Therefore, we can take advantage of the satellite’s natural rotation to maintain the antenna within 10° NADIR.
To do this, we can mount the antenna along the axis with the lowest moment of inertia. From the provided inertia matrix for first satellite, it can be seen that the x-axis has the lowest moment of inertia (100 kg-m^2), followed by the y and z axes (500 kg-m^2 each).
Therefore, we would be mounting the antenna along the x-axis to take advantage of the satellite’s natural rotation and maintain the antenna pointing close to NADIR.
The expected format of the array input for this would be 1,0,0
which corresponds to the direction vector of the x-axis. Putting in the values we get ->
|
|
Great! Now we to mount antenna for the next satellite.
To determine the axis to mount the antenna, we need to find the principal axes of the inertia matrix. The principal axes are the eigenvectors of the inertia matrix, and they represent the directions along which the moments of inertia are maximum, minimum, and intermediate.
Using a Python script or a linear algebra calculator, we can calculate the eigenvectors of the given inertia matrix.
The code I used to calculate eigenvalues and their corresponding eigenvectors ->
|
|
Output of this would be ->
|
|
The eigenvectors are normalized and correspond to the x, y, and z axes of the body-fixed frame, respectively. The first eigenvector, [-0.35963608 0.6763771 -0.64278761], represents the direction with the lowest moment of inertia, and it corresponds to the x-axis.
The expected format of the array input for this would be -0.35963608,0.6763771,-0.64278761
which corresponds to the direction vector of the x-axis.
After we mount the antenna for satifying the 10° criteria for a single satellite for 10 orbits. We will be presented with another 5 intertial matrics for 5 different satellites.
Performing these steps for all satellites we get the flag after the criteria is satisfied for the last satellite ->
|
|
And that’s how we get the flag!
Thoughts
This was an introductry challenge with a hint of orbital physics and astrodynamics. Other challenges were more complex than this, and hence we found it impossible to progress ahead in face of extreme odds. But nonetheless, we persevered and came 115 out of some 400 teams.
Stay Tuned!
Tx0actical. Out.