Rename Everything

This commit is contained in:
Ankan Pal 2023-04-16 08:28:16 +05:30 committed by GitHub
parent 00342bc2d4
commit 6d2d0c7deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 61 additions and 61 deletions

View File

@ -1,8 +1,8 @@
# Alternate way to get root access in JioFiber ONT for newer firmwares with router specific encryption keys
# Alternate way to get root access in JF ONT for newer firmwares with router specific encryption keys
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage. Any wrong step might brick your router. So be aware.*
1. First of all, follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-Any-File-From-JioFiber-ONT-Home-Gateway.md) to get the file at `/flash/secure/key.txt` which is the encryption key of your backup config.
1. First of all, follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Get-Any-File-From-JF-ONT-Home-Gateway.md) to get the file at `/flash/secure/key.txt` which is the encryption key of your backup config.
2. Go to your router admin page and download a backup of your router settings configuration from Administrator > Maintenance.
3. Decrypt the config (`.enc` file) using the command `openssl aes-128-cbc -d -pass file:key.txt -in input.enc -out output.txt` (Change `input.enc` and `output.txt` respectively to your requirements).
4. Open the decrypted config file.

View File

@ -3,7 +3,7 @@
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage.*
1. Make sure you have [**openssl**](https://wiki.openssl.org/index.php/Binaries) **installed** or else install it and **add it to environment variable PATH**.
2. Grab the key for your router model from [here](https://github.com/itsyourap/JioFiber-Home-Gateway/tree/master/EncryptionKeys/).
2. Grab the key for your router model from [here](https://github.com/JFC-Group/JF-Customisation/tree/master/EncryptionKeys/).
3. Go to Your **Router WEB-UI Page** (`http://192.168.29.1`) and Sign in as **Admin**. (The default credentials are **`admin : Jiocentrum`**)
4. Go to **Administrator** --> **Maintenance** and click **Backup**.
5. A file (`RSTXXXXXXX_JCXXXXX.enc`) will be downloaded with **`.enc`** extension.
@ -11,4 +11,4 @@
7. **Decrypt** the downloaded **`.enc`** file using the command
`openssl aes-128-cbc -d -kfile "<path to the key file>" -in "RSTXXXXXXX_JCXXXXX.enc" -out "RSTXXXXXXX_JCXXXXX.txt"`
8. `RSTXXXXXXX_JCXXXXX.txt` contains the decrypted configuration. You might view or edit it at your own risk as your router may get bricked due to incorrect configuration (A hard reset might fix it. Just push the button (inside a hole) behind the router for about 30 seconds)
9. You may also want to encrypt the configuration file after editing it and restore it. Instructions to do so are [here](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Encrypt-Router-Configuration-File.md).
9. You may also want to encrypt the configuration file after editing it and restore it. Instructions to do so are [here](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Encrypt-Router-Configuration-File.md).

View File

@ -4,7 +4,7 @@
**NOTE : JioCall/Landline/JioSTB/Firmware Auto Update/Changing WiFi settings from MyJio or JioHome apps won't work if TR-069 is disabled.**
1. First of all, follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
1. First of all, follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
2. Open `RSTXXXXXXX_JCXXXXX.txt` with Notepad or other Text Editor.
3. **Find** the line
`config.tr69["ManagementServer"][1]["URL"] = "https://acs.oss.jio.com:8443/ftacs-digest/ACS"`
@ -18,4 +18,4 @@ and **replace** it with
`config.tr69["ManagementServer"][1]["PeriodicInformEnable"] = "1"`
and **replace** it with
`config.tr69["ManagementServer"][1]["PeriodicInformEnable"] = "0"`
6. Follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel.
6. Follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel.

View File

@ -4,10 +4,10 @@
**NOTE: FTP username will be admin & password will be your admin password in WEB-UI (Router Configuration Page)**
1. First of all, follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
1. First of all, follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
2. Open `RSTXXXXXXX_JCXXXXX.txt` with Notepad or other Text Editor
3. **Find** the line
`config.vsftpd["ftpd"][1]["enable"] = "0"`
and **replace** it with
`config.vsftpd["ftpd"][1]["enable"] = "1"`
4. Follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel.
4. Follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel.

View File

@ -3,7 +3,7 @@
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage. Any wrong step might brick your router. So be aware.*
1. First of all, follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-Root-Access-JioFiber-ONT-Home-Gateway.md) to enable root access to your router.
1. First of all, follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Get-Root-Access-JF-ONT-Home-Gateway.md) to enable root access to your router.
2. Use command `pkill vsftpd` to kill any already running FTP server on your router.

View File

@ -2,7 +2,7 @@
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage. Any wrong step might brick your router. So be aware.*
1. First of all, follow [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
1. First of all, follow [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Decrypt-Router-Configuration-File.md) to get the router decrypted configuration file `RSTXXXXXXX_JCXXXXX.txt`
2. Open `RSTXXXXXXX_JCXXXXX.txt` with Notepad or other Text Editor.
@ -16,7 +16,7 @@
5. Ensure there is no line break in the line you just pasted. The whole content should be in a single line and the line should start with `config` otherwise this isn't gonna work.
6. Follow **from step 6** mentioned in [this guide](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel. (You have to skip from step 1 to 5 in that guide otherwise your router may reset or restart and you will not have root).
6. Follow **from step 6** mentioned in [this guide](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Encrypt-Router-Configuration-File.md) to re-encrypt the configuration file and restore it via the router admin panel. (You have to skip from step 1 to 5 in that guide otherwise your router may reset or restart and you will not have root).
7. Connect your router via Telnet at port 23 with `root` as user name and `password` as password.

View File

@ -1,4 +1,4 @@
# Get Logs (dbglogs)
# Get Logs (dbglogs) [Doesn't Work Anymore]
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage.*
@ -6,11 +6,11 @@
1. Make sure you have [**openssl**](https://wiki.openssl.org/index.php/Binaries) **installed** or else install it and **add it to environment variable PATH**.
2. ~~**Download** and **Extract** the **zip** of your respective firmware from [here](https://github.com/itsyourap/JioFiber-Home-Gateway/tree/master/Firmwares/)~~
2. ~~**Download** and **Extract** the **zip** of your respective firmware from [here](https://github.com/JFC-Group/JF-Customisation/tree/master/Firmwares/)~~
3. ~~Get **`server.key`** file from the Extracted zip at **`/pfrm2.0/etc/server.key`** and Copy it to **`Desktop/JioFiber`**.~~
3. ~~Get **`server.key`** file from the Extracted zip at **`/pfrm2.0/etc/server.key`** and Copy it to **`Desktop/JF`**.~~
4. Grab the encryption key for your router model from [here](https://github.com/itsyourap/JioFiber-Home-Gateway/tree/master/EncryptionKeys/) and Copy it to **`Desktop/JioFiber`** as `server.key`
4. ~~Grab the encryption key for your router model from [here](https://github.com/JFC-Group/JF-Customisation/tree/master/EncryptionKeys/) and Copy it to **`Desktop/JF`** as `server.key` ~~
5. Go to Your **Router WEB-UI Page** (`http://192.168.29.1`) and Sign in as **Admin**. (The default credentials are **admin : Jiocentrum**)
@ -18,16 +18,16 @@
7. Press Enter and wait a few minutes until a file gets downloaded.
8. Save the downloaded file (**`reliance-dbglog-enc.tgz`**) to **`Desktop/JioFiber`**
8. Save the downloaded file (**`reliance-dbglog-enc.tgz`**) to **`Desktop/JF`**
9. Open up **Terminal** or **Command Prompt** in **`Desktop/JioFiber`**
9. Open up **Terminal** or **Command Prompt** in **`Desktop/JF`**
10. **Decrypt** the downloaded **.enc** file using the command
`openssl aes-128-cbc -d -kfile "server.key" -in "reliance-dbglog-enc.tgz" -out "reliance-dbglog-dec.tgz"`
11. **Extract** the `reliance-dbglog-dec.tgz` file using **7zip** or use the command `tar -xvf reliance-dbglog-dec.tgz`
12. You will see a lot of files have been extracted to the directory **`Desktop/JioFiber`**. These are the dbglogs.
12. You will see a lot of files have been extracted to the directory **`Desktop/JF`**. These are the dbglogs.
13. Use [DB Browser for SQLite](https://sqlitebrowser.org/) to open the files with **`.db`** extension.

View File

@ -1,29 +1,29 @@
# JioFiber-Home-Gateway
# JF-Customisation
This repository contains all the files and instructions to customize your JioFiber ONT Gateway. You can grab your Gateway's firmware from [Firmware](https://github.com/itsyourap/JioFiber-Home-Gateway/tree/master/Router%20Firmware/) or you can find instructions for miscellaneous customizations from [Instructions](https://github.com/itsyourap/JioFiber-Home-Gateway/tree/master/Instructions/).
This repository contains all the files and instructions to customize your JF ONT Gateway. You can grab your Gateway's firmware from [Firmware](https://github.com/JFC-Group/JF-Customisation/tree/master/Router%20Firmware/) or you can find instructions for miscellaneous customizations from [Instructions](https://github.com/JFC-Group/JF-Customisation/tree/master/Instructions/).
*Special Thanks to [yashrastogi](https://broadbandforum.co/members/yashrastogi.81002/) for getting the [OTA URL of Jio STB](https://broadbandforum.co/threads/jio-stb-jhsd200-ota-link.209956/) and [RealEng1neer](https://github.com/RealEng1neer) for arranging the ONT Firmware Links.*
### Available Instructions :-
1. [Getting Logs (dbglogs) from JioFiber ONT Home Gateway](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-dbglogs-JioFiber-ONT-Home-Gateway.md)
1. [Getting Logs (dbglogs) from JF ONT Home Gateway](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Get-dbglogs-JF-ONT-Home-Gateway.md)
2. [Enable FTP on JioFIber ONT Home Gateway](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Enable-FTP-JioFiber-ONT-Home-Gateway.md) *(Might not work, check 5th instruction instead)*
2. [Enable FTP on JF ONT Home Gateway](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Enable-FTP-JF-ONT-Home-Gateway.md) *(Might not work, check 5th instruction instead)*
3. [Disable TR-069 on JioFiber ONT Home Gateway](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Disable-TR-069-JioFiber-ONT-Home-Gateway.md) *(Might not work)*
3. [Disable TR-069 on JF ONT Home Gateway](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Disable-TR-069-JF-ONT-Home-Gateway.md) *(Might not work)*
4. [Get Root Access on JioFiber ONT Home Gateway](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-Root-Access-JioFiber-ONT-Home-Gateway.md) *(Might not work as Jio changed the encryption key in R2.39 update! Please use [this](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Alternate-Way-To-Get-Root-Access-JioFiber-ONT-Home-Gateway.md) instead)*
4. [Get Root Access on JF ONT Home Gateway](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Get-Root-Access-JF-ONT-Home-Gateway.md) *(Might not work as Jio changed the encryption key in R2.39 update! Please use [this](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Alternate-Way-To-Get-Root-Access-JF-ONT-Home-Gateway.md) instead)*
5. [Enable FTP Server with `/` as FTP Root](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Enable-Root-FTP-JioFiber-ONT-Home-Gateway.md)
5. [Enable FTP Server with `/` as FTP Root](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Enable-Root-FTP-JF-ONT-Home-Gateway.md)
6. [Get any file directly from your Jio Router's Filesystem to your pendrive](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-Any-File-From-JioFiber-ONT-Home-Gateway.md)
6. [Get any file directly from your Jio Router's Filesystem to your pendrive](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Get-Any-File-From-JF-ONT-Home-Gateway.md)
7. [Updated and Alternate Way to Get Root in JioFiber ONT Home Gateway](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Alternate-Way-To-Get-Root-Access-JioFiber-ONT-Home-Gateway.md)
7. [Updated and Alternate Way to Get Root in JF ONT Home Gateway](https://github.com/JFC-Group/JF-Customisation/blob/master/Instructions/Alternate-Way-To-Get-Root-Access-JF-ONT-Home-Gateway.md)
8. [Key Guesser for Encrypted Router Configuration file](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/keyguesser.py)
8. [Key Guesser for Encrypted Router Configuration file](https://github.com/JFC-Group/JF-Customisation/blob/master/keyguesser.py)
### Others
1. [JioFiber SIP Breakdown](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Research/SIP.md)
1. [JF SIP Breakdown](https://github.com/JFC-Group/JF-Customisation/blob/master/Research/SIP.md)
## Disclaimer
*This is Only for educational purposes. No one is responsible for any type of damage.*

View File

@ -1,12 +1,12 @@
# JioFiber SIP Breakdown
# JF SIP Breakdown
**Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage.**
*This is what I know so far about the SIP framework used in JioFiber router and JioJoin app to make calls.*
*This is what I know so far about the SIP framework used in JF router and JJoin app to make calls.*
## The Story
Back in 2020, before I came to know about the JioFiber firmware, the first thing I did was to sniff the network packets sent from the JioCall app to the router while registering and calling through the app for the first time. But when I turned on the sniffing app, JioCall was not detecting the router because the sniffing app was using VPN method and thus the local network was not accessible through it.
Back in 2020, before I came to know about the JF firmware, the first thing I did was to sniff the network packets sent from the JioCall app to the router while registering and calling through the app for the first time. But when I turned on the sniffing app, JioCall was not detecting the router because the sniffing app was using VPN method and thus the local network was not accessible through it.
So I turned on my laptop, installed JioCall on an Android Emulator, turned on Wireshark, and then opened JioCall. Everything was working perfectly. But the requests which the app made to the router was encrypted by self-signed certificate, so I couldn't actually sniff the packets. But I got something useful : **The ports which the SIP Server listens on, which are 8080, 8443 and 7443**.
@ -16,15 +16,15 @@ Next thing I did was to decompile the JioCall apk via [jadx](https://github.com/
{"imsi": "00000XXXXXXXXXX","msisdn": "XXXXXXXXXX","mcc": "405","mnc": "874","mode": "JFV","mac_address": "aa:bb:cc:dd:ee:ff","JTCAutoWhitelist": "true","SelfHelpONTLogs": "true","CentralizedCallBlocking": "true","CentralizedCallWaiting": "true"}
```
Indeed, the `msisdn` key contained my JioFiber landline number. I also tried the other URL paths but none of them worked, perhaps those need an API key to work. Atleast I know that I am heading to the right path.
Indeed, the `msisdn` key contained my JF landline number. I also tried the other URL paths but none of them worked, perhaps those need an API key to work. Atleast I know that I am heading to the right path.
After an year, in October 2021, I found [this repository](https://github.com/fawazahmed0/Jio-fiber-Modem) where I found JioFiber Firmware. I downloaded the firmware quickly and started to explore its contents. I read the lua codes and came to know how the WEB-UI works and stuff. I discovered the way to [get dbglogs from JioFiber](https://github.com/itsyourap/JioFiber-Home-Gateway/blob/master/Instructions/Get-dbglogs-JioFiber-ONT-Home-Gateway.md) and within November, I discovered the way to decrypt the router settings backup file using the Router keys.
After an year, in October 2021, I found [this repository](https://github.com/fawazahmed0/Jio-fiber-Modem) where I found JF Firmware. I downloaded the firmware quickly and started to explore its contents. I read the lua codes and came to know how the WEB-UI works and stuff. I discovered the way to [get dbglogs from JF](https://github.com/itsyourap/JF-Home-Gateway/blob/master/Instructions/Get-dbglogs-JF-ONT-Home-Gateway.md) and within November, I discovered the way to decrypt the router settings backup file using the Router keys.
Then I started looking for the VoIP server code (which is called the Juice Server) in the firmware which led me to `/pfrm2.0/etc/voipInit` which further led me to `pfrm2.0/bin/hgw-voice-app` which was, of course, a binary, that cannot be decompiled easily. So, I started dumping the strings present in the binary and I found a reference to `libims.so` library which was present in `/pfrm2.0/lib/`. Dumping the strings in the `libims.so` gave me exactly what I needed.
## Juice Server
The Juice server in JioFiber is responsible for handling all the SIP communications. JioJoin app uses its API to make calls using the JioFiber VoIP Landline number.
The Juice server in JF is responsible for handling all the SIP communications. JJoin app uses its API to make calls using the JF VoIP Landline number.
**Uses Ports :** 8080, 7443, 8443, 5068 (maybe more)
@ -33,14 +33,14 @@ The Juice server in JioFiber is responsible for handling all the SIP communicati
1. `http://192.168.29.1:8080/pcap?start=1` will start recording all packets sent from/to the Juice Server until stopped.
2. `http://192.168.29.1:8080/pcap?stop=1` will stop recording packets.
3. `http://192.168.29.1:8080/logs` will let you download the captured packets in a pcap file along with the complete Juice Log dump (VERY USEFUL).
4. `http://192.168.29.1:8080/request_account` will give you a JSON consisting of your JioFiber Landline Number, MCC, MNC, etc etc.
4. `http://192.168.29.1:8080/request_account` will give you a JSON consisting of your JF Landline Number, MCC, MNC, etc etc.
5. `http://192.168.29.1:8080/request_mac` will give you a JSON with your router's MAC address in it.
There are many more, but the first three are the most important links.
## How JioJoin Works
## How JJoin Works
1. First, after opening JioJoin for the first time, it will search for the host `jiofiber.local.html` with a DNS Query. If found, JioJoin will assume that you are on a JioFiber network. *(This is why using custom DNS providers stops JioJoin from working, to tackle this, you can define `jiofiber.local.html` with your router's static IP in your `hosts` file)*
1. First, after opening JJoin for the first time, it will search for the host `jiofiber.local.html` with a DNS Query. If found, JJoin will assume that you are on a JF network. *(This is why using custom DNS providers stops JJoin from working, to tackle this, you can define `jiofiber.local.html` with your router's static IP in your `hosts` file)*
2. After you click on the "Generate OTP" button, your phone sends an API request to the Juice Server in the router. The request is kinda like this :-
```none
@ -51,7 +51,7 @@ There are many more, but the first three are the most important links.
Let me explain the request and what it does.
The `mac_address` parameter contains a random mac address (it is not a real mac address of any device in your network, it is a random mac generated like as a session key which persists with the current JioJoin installation. It might be the real mac address in case of Jio STB).
The `mac_address` parameter contains a random mac address (it is not a real mac address of any device in your network, it is a random mac generated like as a session key which persists with the current JJoin installation. It might be the real mac address in case of Jio STB).
The `nwk_intf` parameter represents the Network Interface used for the request, it can either be `wifi` (almost everytime) or `eth` (in case of requests from Jio STB).
@ -59,7 +59,7 @@ There are many more, but the first three are the most important links.
The `mac_address` and `op_type` are essential parameters in this request.
So, whenever this request is sent to the Juice Server, the Server first checks the `op_type` parameter. If it is `add` then the server has to add the device (from where the request was initiated) to SIP whitelist (devices in this list are the only devices which are permitted to send or receive SIP requests/responses). The server differentiates between clients (I mean different JioJoin apps on different devices) using the `mac_address` parameter which is unique for each JioJoin app installation. The Juice server checks if the `mac_address` is already present in the whitelisted devices list. If it is present it replies with a XML data which contains all the SIP configs which is explained later. For now let us assume that our device was not previously whitelisted. An OTP is sent to your JioFiber linked mobile number. The Juice server then responds with a **`200 OK`** status code but without any response data. But the server provides with some important response headers which are
So, whenever this request is sent to the Juice Server, the Server first checks the `op_type` parameter. If it is `add` then the server has to add the device (from where the request was initiated) to SIP whitelist (devices in this list are the only devices which are permitted to send or receive SIP requests/responses). The server differentiates between clients (I mean different JJoin apps on different devices) using the `mac_address` parameter which is unique for each JJoin app installation. The Juice server checks if the `mac_address` is already present in the whitelisted devices list. If it is present it replies with a XML data which contains all the SIP configs which is explained later. For now let us assume that our device was not previously whitelisted. An OTP is sent to your JF linked mobile number. The Juice server then responds with a **`200 OK`** status code but without any response data. But the server provides with some important response headers which are
```none
Set-Cookie: WITRCSeConfigCookie=uuuuuuuu-vvvv-xxxx-yyyy-zzzzzzzzzzzz
@ -71,9 +71,9 @@ There are many more, but the first three are the most important links.
x-amn: +91********XX
```
The Cookie called `WITRCSeConfigCookie` will be needed when we want to verify the OTP with the Juice Server next while the `x-amn` header signifies the JioFiber linked mobile number to which the OTP was sent.
The Cookie called `WITRCSeConfigCookie` will be needed when we want to verify the OTP with the Juice Server next while the `x-amn` header signifies the JF linked mobile number to which the OTP was sent.
3. JioJoin tells you that an OTP was sent to your registered mobile number `+91********XX` which is derived from the `x-amn` header from the previous step. You type the OTP and submit it. Now the request is sent to the Juice Server looks like this (assume the OTP is 696969):
3. JJoin tells you that an OTP was sent to your registered mobile number `+91********XX` which is derived from the `x-amn` header from the previous step. You type the OTP and submit it. Now the request is sent to the Juice Server looks like this (assume the OTP is 696969):
```none
https://jiofiber.local.html:8443/?OTP=696969
@ -87,12 +87,12 @@ There are many more, but the first three are the most important links.
which we have received from the `Set-Cookie` header from the server response in step 2.
4. As soon as the OTP is verified, the Juice Server whitelists the `mac_address` associated with the request with the cookie and replies with an XML body. This XML is the SIP configuration required to make calls using JioJoin. Now, as the `mac_address` is verified, you can use it to get the XML configuration anytime using step 2. The response in step 2 will now be the XML data without any further authentication.
4. As soon as the OTP is verified, the Juice Server whitelists the `mac_address` associated with the request with the cookie and replies with an XML body. This XML is the SIP configuration required to make calls using JJoin. Now, as the `mac_address` is verified, you can use it to get the XML configuration anytime using step 2. The response in step 2 will now be the XML data without any further authentication.
The XML Configuration looks like this :
```xml
<?xml version="1.0"?>
```xml
<?xml version="1.0"?>
<wap-provisioningdoc version="1.1">
<characteristic type="application">
<characteristic type="appauth">
@ -276,25 +276,25 @@ There are many more, but the first three are the most important links.
2. Under `characteristic` of type `application.lbo_p-cscf_address`:
`address` - Refers to the SIP Proxy URL which is basically the port 5068 of JioFiber
`address` - Refers to the SIP Proxy URL which is basically the port 5068 of JF
3. Under `characteristic` of type `application.other`:
`uuid_value` represents the value of `mac_address` parameter, if your `mac_address` parameter was `aa:bb:cc:dd:ee:ff` then the last section of the uuid will be `AABBCCDDEEFF`. The first sections are same for every device under every router as far as I know.
## How SIP (in JioJoin and JioFiber) Works
## How SIP (in JJoin and JF) Works
*You can see the pcap yourself if you use the previously provided important links in the [Juice Server section](#juice-server).*
### REGISTER Request
The REGISTER request sent by the SIP client (here, JioJoin app) looks like this:
The REGISTER request sent by the SIP client (here, JJoin app) looks like this:
```none
REGISTER sip:wb.wln.ims.jio.com SIP/2.0
Via: SIP/2.0/TLS [<My IPv6 Address>]:42131;branch=z9hG4bK-642413-1---7f3f2b4d23eea124;rkeep=180
Max-Forwards: 70
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JioJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none";q=0.5
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none";q=0.5
To: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>
From: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>;tag=j6ska8a
Call-ID: _idu1H_8kdsjK9sja..
@ -314,7 +314,7 @@ Things that makes Jio's SIP protocol different from others are:
1. **The Contact Header** - The contact header must have the `+sip.instance` parameter with proper value format otherwise you will get *401 Unauthorized* response from the server. The proper format of this parameter is `+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>"` where you have to put the value of uuid got from the XML previously.
Let me be clear, other SIP Server/Clients have their `+sip.instance` parameter format as `+sip.instance="<urn:uuid:ABCABCAB-AABB-CCDD-EEFF-AABBCCAABBCCC>"` - Note the string `urn:uuid:` is present which Jio's Juice Server does not support. (This is why using a third party SIP client like MicroSIP to call through JioFiber isn't gonna work).
Let me be clear, other SIP Server/Clients have their `+sip.instance` parameter format as `+sip.instance="<urn:uuid:ABCABCAB-AABB-CCDD-EEFF-AABBCCAABBCCC>"` - Note the string `urn:uuid:` is present which Jio's Juice Server does not support. (This is why using a third party SIP client like MicroSIP to call through JF isn't gonna work).
2. **The P-Access-Network-Info Header** - Use it on every request.
@ -363,7 +363,7 @@ After preparing our response, we need to send another REGISTER request with a fu
REGISTER sip:wb.wln.ims.jio.com SIP/2.0
Via: SIP/2.0/TLS [<My IPv6 Address>]:42131;branch=z9hG4bK-642413-1---7f3f2b4d23eea124;rkeep=180
Max-Forwards: 70
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JioJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none";q=0.5
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none";q=0.5
To: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>
From: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>;tag=j6ska8a
Call-ID: _idu1H_8kdsjK9sja..
@ -383,7 +383,7 @@ Now we get a *200 OK* from the server:
SIP/2.0 200 OK
Via: SIP/2.0/TLS [<My IPv6 Address>]:42131;branch=z9hG4bK-642413-1---7f3f2b4d23eea124;rkeep=180
Require: outbound
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JioJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;video;q=0.5;expires=86399;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none"
Contact: <sip:+91XXXXXXXXXX@[<My IPv6 Address>]:42131;pn-prid=<FCM Token provided from JJoin (This parameter is not required)>;pn-param=com.jio.jse;pn-provider=fcm;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;video;q=0.5;expires=86399;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";+g.3gpp.iari-ref="urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none"
To: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>;tag=32ad2f2c
From: <sip:+91XXXXXXXXXX@wb.wln.ims.jio.com>;tag=j6ska8a
Call-ID: _idu1H_8kdsjK9sja..
@ -402,7 +402,7 @@ Via: SIP/2.0/TLS [<My IPv6 Address>]:43696;rkeep=180;branch=z9hG4bK-<Branch>
Max-Forwards: 70
Contact: <sip:[<My IPv6 Address>]:43696;transport=tls>;+sip.instance="<00000000-0000-1000-8000-AABBCCDDEEFF>";reg-id=1;+g.3gpp.icsi-ref="urn:urn-7:3gpp-service.ims.icsi.mmtel";video;+g.3gpp.iari-ref="urn:urn-7:3gpp-application.ims.iari.rcs.jio.eucr";+g.gsma.rcs.telephony="none";q=0.5
To: <sip:<Recipent Mobile Number starting with 0>@wb.wln.ims.jio.com?phone-context=wb.wln.ims.jio.com&user=phone>
From: <sip:+91<My JioFiber Number>@wb.wln.ims.jio.com>;tag=4cwftvh2
From: <sip:+91<My JF Number>@wb.wln.ims.jio.com>;tag=4cwftvh2
Call-ID: <callid>@<My IPv6 Address>
CSeq: 1 INVITE
Session-Expires: 1800
@ -410,8 +410,8 @@ Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, SUBSCRIBE, UPDATE, PRACK, INFO
Content-Type: application/sdp
Supported: outbound, path, gruu, replaces, timer, norefersub, 100rel
User-Agent: JioFiberVoice/1.0
P-Preferred-Identity: <sip:+91<My JioFiber Number>@wb.wln.ims.jio.com>
User-Agent: JFVoice/1.0
P-Preferred-Identity: <sip:+91<My JF Number>@wb.wln.ims.jio.com>
P-Access-Network-Info: GPON; PSAPId=+91XXXX
Content-Length: 675
@ -447,10 +447,10 @@ When the recipient picks up the call, we get a *183 Session Progress* from the J
Also you need to send ACK and PRACK requests frequently to keep the call alive. You can read any SIP documentations available on the internet for more info.
Right now, I am stuck at using the RTP. In the INVITE request you can see the request data which is SDP. The `m` parameter gives us the media info which is `RTP/AVP` on port `52000`. Yes you can use any program to create RTP server on that port but the the actual RTP server will be created on the JioFiber side for further communication.The only problem is the audio codec. The audio codec used is `AMR/AMR-WB` which from Android. I don't have the time to look at the whole source code of the audio codec in android repository. You can help me out with this.
Right now, I am stuck at using the RTP. In the INVITE request you can see the request data which is SDP. The `m` parameter gives us the media info which is `RTP/AVP` on port `52000`. Yes you can use any program to create RTP server on that port but the the actual RTP server will be created on the JF side for further communication.The only problem is the audio codec. The audio codec used is `AMR/AMR-WB` which from Android. I don't have the time to look at the whole source code of the audio codec in android repository. You can help me out with this.
I have tried connecting to the RTP server in the Juice Server and I got the audio data but it was AMR-WB encoded. I tried to use some third party programs to get audible audio from the data and one seems to work : [Check this Python Program](https://github.com/Spinlogic/AMR-WB_extractor). This gives me what I need but right now idk how to play the audio in realtime and how to reverse this process so that I can send audio data for the call.
If you do find a way to play the AMR/AMR-WB encoded audio in realtime and record AMR/AMR-WB audio in realtime and use the RTP server to establish communication between the caller and the callee, feel free to open a discussion in this repository.
If you do find a way to play the AMR/AMR-WB encoded audio in realtime and record AMR/AMR-WB audio in realtime using the OpenCore AMR library (originally built for Android) in Desktop and use the RTP server to establish communication between the caller and the callee, feel free to open a discussion in this repository.
Until then, this is the dead end.

View File

@ -1,6 +1,6 @@
# Instructions
1. The .img and .sig files are the original bundled Release firmware from Jio that can be flashed through the WEB-UI.
1. The .img and .sig files are the original bundled Release firmware from JF that can be flashed through the WEB-UI.
2. The extracted firmwares are in the zip files respectively.

View File

@ -1,4 +1,4 @@
# Check Available Versions For Jio Router Firmwares
# Check Available Versions For JF Router Firmwares
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage.*

View File

@ -1,4 +1,4 @@
# Check Available Versions For Jio STB Firmwares
# Check Available Versions For STB Firmwares
*Disclaimer: - This is Only for educational purposes, No one is responsible for any type of damage.*

View File

@ -3,7 +3,7 @@
# This is only for educational purposes. No one is responsible for any type of damage.
__author__ = "itsyourap"
__url__ = "https://github.com/itsyourap/JioFiber-Home-Gateway"
__url__ = "https://github.com/JFC-Group/JF-Customisation"
"""
This script tries to guess and identify the encryption key used to encrypt