import Link from 'next/link'; export default function CTFGuide() { const vulnerabilities = [ { name: 'Cross-Site Scripting (XSS)', flag: 'FL4G{X55_F0UND}', location: 'Search functionality', difficulty: 'Medium', description: 'JavaScript injection vulnerability that allows execution of malicious scripts in the browser context.', hints: [ 'Look for input fields that display user content', 'Try injecting HTML tags and JavaScript code', 'Test both stored and reflected XSS vectors', 'Example payload: ' ], prevention: [ 'Sanitize and validate all user inputs', 'Use Content Security Policy (CSP)', 'Encode output data before rendering', 'Use secure templating engines' ] }, { name: 'SQL Injection', flag: 'FL4G{5QL_1NJ3CT10N_5UCC355}', location: 'Login form', difficulty: 'High', description: 'Database query manipulation that can lead to unauthorized data access, modification, or deletion.', hints: [ 'Examine forms that interact with databases', 'Try SQL metacharacters in input fields', 'Test authentication bypass techniques', 'Example payload: admin\' OR \'1\'=\'1\' --' ], prevention: [ 'Use parameterized queries/prepared statements', 'Apply input validation and sanitization', 'Implement least privilege database access', 'Use stored procedures with proper validation' ] }, { name: 'Insecure Direct Object Reference (IDOR)', flag: 'FL4G{1D0R_4DM1N_4CC355}', location: 'Product pages', difficulty: 'Medium', description: 'Access control vulnerability allowing unauthorized access to objects by manipulating reference values.', hints: [ 'Look for numeric IDs in URLs', 'Try accessing different object identifiers', 'Test sequential ID enumeration', 'Check for admin or hidden resources' ], prevention: [ 'Implement proper access controls', 'Use indirect object references (UUIDs)', 'Validate user authorization for each request', 'Apply role-based access control' ] }, { name: 'Local File Inclusion (LFI)', flag: 'FL4G{LF1_*}', location: 'Product file viewer', difficulty: 'High', description: 'File system access vulnerability that allows reading of local server files through path manipulation.', hints: [ 'Look for file parameter inputs', 'Try directory traversal sequences', 'Test relative and absolute paths', 'Example payload: ../../../etc/passwd' ], prevention: [ 'Validate and sanitize file paths', 'Use whitelists for allowed files', 'Implement proper access controls', 'Avoid user input in file operations' ] }, { name: 'File Upload Vulnerabilities', flag: 'FL4G{*UPL04D*}', location: 'Profile page', difficulty: 'High', description: 'Insecure file upload that can lead to remote code execution or system compromise.', hints: [ 'Look for file upload functionality', 'Try uploading different file types', 'Test executable file extensions', 'Examine file validation mechanisms' ], prevention: [ 'Validate file types and extensions', 'Scan uploaded files for malware', 'Store uploads outside web root', 'Implement file size restrictions' ] } ]; return (
Complete walkthrough of all vulnerability challenges
{vuln.description}
{vuln.location}
{vuln.flag}
• Only test on systems you own or have explicit permission to test
• Never use these techniques on unauthorized systems
• Respect responsible disclosure practices
• Use knowledge for defensive purposes