NETCOMP 3.0
EZNotes
Web Exploitation
GraphQL IDOR
Karbitan
Web Exploitation
Websocket Automation
Karbitan V2
Web Exploitation
Race Condition Websocket
EZNotes
TL;DR
GraphQL IDOR lead to Broken Access Control
Solution
No source code is given in this challenge, so I just directly try to inspect the website to get some information
We get some nice information, which is the current challenge have objective with graphql service. So, I try to start the enumeration of this graphql service with this common query
When the query above to server it will result the response like below
Take a look from the response we notice that some schema is never get called, which is userNotes
and users
. From the information I try to get more information from that schema query.
So, I use the python script to make the enumeration is clear and more readable
We get nothing, just empty array of notes in the response. I just assume that this notes only get the notes from the current authenticated user. Then we try the users
query to see if there is accessible and we can see the list of available users.
We got something, in the response we know the detailed information about the admin user, so maybe we can use this information to get something information then get the flag.
Remember, we have the query userNotes
which is accept the user id
argument to get the notes, looks so getting closer to the flag right? let's try add this exploit function
then called it and let's see the result
Flag
Netcomp{eazzy_graphql_broken_access_control_exploit_n0tes}
Karbitan
TL;DR
Simple websocket connection to emit and increase the score to get the flag
Solution
Given the server.js
attachment, which is the websocket service, the functionality is just to increase the score point until get the minimum point to get the flag
There is the constant config variable that exists in the source code
So, simple when we hit we can only send the 50
score, and the minimum score to get the flag is 5000
we know that in the source code is doesn't have any restriction, then we can just send the score 50
over and over until we get the minimum score. So this is my final solver
Flag
Netcomp{webs0cket_k4rbitan_so_e4sy}
Karbitan V2
TL;DR
Has same objective with the previous challenge, but we must win the race condition to get the flag.
Solution
We got some enhancemnet in the service code
Notice, there is now has the socket.lock
variable, which is will indicate when the incremental score can't be use again, then when socket.lock
is true it will call the deleteData
function
That's mean our score history will be deleted from the database. Then how?
Remember and take a look again the source, which is whensocket.lock
is still has false
value we can still make the increment the score, so that's mean we must make a bunch of request before socket.lock
converted to true
, but we must doing that at the almost same time and as quickly as possible we trigger the emit flag
The chance of the Race Condition is so small, so the solver must be ran a several times to get the expected output
Then I run the solver script using the corruntly
program to run it twice in the same time and make the server is overload
Flag
Netcomp{webs0cket_k4rbit_buk4n_s3mb4r4ng_k4rb1t}
Last updated