After inspecting the site, one small detail in the Survey stood out: Our team reads every word! Be creative and specific. when reading this i instantly thought about XSS.
from http.server import HTTPServer, SimpleHTTPRequestHandler import json
class PostHandler(SimpleHTTPRequestHandler): def do_POST(self): content_length = int(self.headers['Content-Length']) post_data = self.rfile.read(content_length) # Log the POST data print(f"POST request received:") print(f"Path: {self.path}") print(f"Headers: {self.headers}") print(f"Body: {post_data.decode('utf-8')}") # Send response self.send_response(200) self.send_header('Content-type', 'application/json') self.end_headers() response = {'status': 'success', 'received': post_data.decode('utf-8')} self.wfile.write(json.dumps(response).encode())
if __name__ == '__main__': server = HTTPServer(('localhost', 8000), PostHandler) print('Server running on http://localhost:8000') server.serve_forever()
to get the flag all i had to do is start the webserver by running: python3 server.py and sent the payload via the survey.