Merge pull request #237 from PretendoNetwork/network-dumps-docs-slash-command

Update network dumps docs
This commit is contained in:
Jonathan Barrow 2024-01-17 10:04:51 -05:00 committed by GitHub
commit e82d567063
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,14 +18,13 @@ In order to make this easier, we have developed a suite of internal tools to cap
</div>
# Submissions
There are multiple ways to submit network dumps. You may either contact a developer directly, or upload your network dumps to any channel in the Discord server. If uploaded to Discord, the Bandwidth bot will automatically detect the dumps and reupload them to our private channel, deleting the original message for security purposes.
There are two ways to submit network dumps. You may either contact a developer directly, or use the `/upload-network-dump` command on our Discord server.
When submitting we ask that you do the following:
1. Only submit dumps for one game at a time, to keep the files organized. Sending multiple dumps of multiple games makes it difficult to know which dumps go to which game,
2. Perform only small actions if possible. Each session should be focussed on as few aspects of the game as possible to minimize "noise" (unrelated packets) which makes it difficult to decipher what is actually going on. For example, rather than uploading a session of playing random courses on Super Mario Maker it would be more helpful if the session was focussed on one part of the game, such as 100 Mario Challenge, starring a course, etc. That way it's clear exactly what the packets are doing in game.
3. When submitting, please provide a detailed description of what was done in the session. For example "Loaded course world and played a random course, starred the course and played a recommended course". This will add further context as to what the packets are doing in the dumps.
4. When submitting, please rename the dumps to something meaningful. Such as `played-and-starred-course-smm-jpn.pcap` rather than `did-something.pcap` or `12-20-23.pcap`. This does not apply to HokakuCafe BIN files, as they must remain named as they are for the Discord bot to detect them
1. Perform as few actions as possible per session. Each session should be focussed on as few aspects of the game as possible to minimize "noise" (unrelated packets) which makes it difficult to decipher what is actually going on. For example, rather than uploading a session of playing random courses on Super Mario Maker it would be more helpful if the session was focussed on one part of the game, such as 100 Mario Challenge, starring a course, etc. That way it's clear exactly what the packets are doing in game.
2. When submitting, please provide a detailed description of what was done in the session. For example "Loaded course world and played a random course, starred the course and played a recommended course". This will add further context as to what the packets are doing in the dumps.
3. When submitting, please rename the dumps to something meaningful. Such as `played-and-starred-course-smm-jpn.pcap` rather than `did-something.pcap` or `12-20-23.pcap`. This does not apply to HokakuCafe BIN files, as they must remain named as they are. The file name of HokakuCafe BIN gives us important information regarding your session not found in the BIN data itself.
# Game Packets
Game packet dumps are the packets sent during a session to a game server. These packets are typically encrypted, so additional data will need to be submitted in order for us to decrypt them. There are several ways to dump these packets and the data needed to decrypt them.
@ -42,7 +41,7 @@ The easiest way to dump game server packets from a 3DS is to use [HokakuCTR](htt
To use HokakuCTR, ensure you are updated to the latest Luma release. The latest Luma release now supports 3GX plugins. Download the [latest release](https://github.com/PretendoNetwork/HokakuCTR/releases/latest). Place this file on the SD card at `luma/plugins` and rename it `default.3gx`.
When launching a game you will see 1 of 2 notifications on screen. You will either see `Not Ready` or `Ready`. If you see `Not Ready`, your game is not compatible. If you see `Ready`, your game is compatible. If you see nothing, either your game is not compatible or the plugin is not installed. If your game is compatible, it will start dumping game traffic to a PCAP file once the game has connected to the server. You will know the game has connected to the server when you see either `Detected NEX buffer type: V0` or `Detected NEX buffer type: V1` on screen. Until one of these notifications is shown, the PCAP will have no data.
When launching a game you will see 1 of 2 notifications on screen. You will either see `Not Ready` or `Ready`. If you see `Not Ready`, your game is not compatible. If you see `Ready`, your game is compatible but has not necessarily started sending data. If you see nothing, either your game is not compatible or the plugin is not installed. If your game is compatible, it will start dumping game traffic to a PCAP file once the game has connected to the server and begun sending data. You will know the game has connected to the server when you see either `Detected NEX buffer type: V0` or `Detected NEX buffer type: V1` on screen. These notifications indicate that the game has begun sending data. If you do not see one of these notifications, no data will be in your dump.
The PCAP is written to the SD card located at `HokakuCTR/[GAME NAME]`. HokakuCTR dumps are already decrypted, no additional data is required to decrypt them. They may be submitted as-is.
@ -52,13 +51,18 @@ If neither solution above works, the only option you have is to capture the traf
Just like with HokakuCafe, traffic dumped with WireShark will be encrypted. In order to decrypt the traffic, your NEX account username and password must also be submitted. Your NEX account has no relation to any other account, such as your NNID, and cannot be used to gain any information about you. It can, however, allow someone to log into game servers as you. Ensure you only provide these details to trusted individuals.
- 3DS - To dump your NEX username and password from a 3DS download and run [this homebrew application](https://9net.org/~stary/get_3ds_pid_password.3dsx). This will create a file on your SD card named `nex-keys.txt` with your NEX username and password. Copy and paste the contents of this file into the message of your submission.
- Wii U - To dump your NEX username and password from a Wii U connect to your Wii U with an FTP client. Navigate to `/storage_mlc/usr/save/system/act` and download all the folders inside this folder. Check the `account.dat` file in each folder and look for your NNID username in the `AccountId` field. Once found, in the same `account.dat` file locate both the `PrincipalId` and `NfsPassword` fields. Copy their values and paste them into the message of your submission.
- Wii U - To dump your NEX username and password from a Wii U connect to your Wii U with an FTP client. Navigate to `/storage_mlc/usr/save/system/act` and download all the folders inside this folder. Check the `account.dat` file in each folder and look for your NNID username in the `AccountId` field. Once found, in the same `account.dat` file locate both the `PrincipalId` and `NfsPassword` fields. `PrincipalId` is your NEX username (PID), and `NfsPassword` is your NEX password.
# HTTP Packets
Some games use HTTP requests for some features. Additionally, non-game titles will often use HTTP requests for their services. The above methods will not always capture HTTP requests in a way that is usable, if at all. SpotPass data is also downloaded via HTTP requests. For this, an HTTP proxy server is required. There are several options for HTTP proxy servers, however the simplest way is using our [mitmproxy Docker container](https://github.com/PretendoNetwork/mitmproxy-nintendo).
Some games use HTTP requests for some features. Additionally, non-game titles will often use HTTP requests for their services. SpotPass data is also downloaded via HTTP requests. The above methods will not always capture HTTP requests in a way that is usable, if at all. For this, an HTTP proxy server is required. There are several options for HTTP proxy servers, however the simplest way is using our [mitmproxy Docker container](https://github.com/PretendoNetwork/mitmproxy-nintendo).
Full credit to the upkeep of the repository, and creation of the original Docker container, goes to GitHub user [MatthewL246](https://github.com/MatthewL246).
<div class="tip">
<h2>Using a Raspberry Pi?</h2>
<strong>Only 64 bit operating systems are supported. If using a Raspberry Pi, ensure you are using a 64 bit variant of your OS.</strong>
</div>
Install Docker for your operating system using the official [setup guide](https://docs.docker.com/get-docker/). If installing on Windows, you ***MUST*** use the WSL backend option. Then follow the steps for your console type.
## 3DS