Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 D-Link DPN-FX3060V GPON WiFi Router, (Nijika) Firmware Community Modding

views
     
kwss
post Jul 24 2024, 09:12 AM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
I just take a look at the firmware. Can you provide the content of ubi0:ubi_Config (/var/config)?

QUOTE(Anime4000 @ May 29 2024, 01:27 PM)
I have send mtd14 (ubi_apps) and IoT Module (D-Link Air) to PON Hacking

There is several vulnerabilities:
1. IoT not suppose to run as Root Privilege
2. IoT bind on all Interface (ppp, nas0, nas1, ethX, wlanX) including t-cont

user posted image
CODE

2227     1 root     S    99512 21.6   1  0.0 /bin/ccom_linkkit [redacted] cloudProductSecret [redacted] [redacted] Shanghai
1690     1 root     S     8872  1.9   2  0.0 /bin/tr142_app

ubi_apps, tr142 and /bin/ccom_linkkit always run as root no matter what, cannot be disable in WebGUI

they found many vulnerability such as common overflow, it can be attack even in Bridge Mode.

I trying to remove from the firmware, it caught on boot loop 😭
It has been suggested that to replace to ability to reply in boot process, this will take time, might more time eradicate any IoT
*
ubi cannot be disabled because it is used to mount the config partition.

tr142 (kernel module + tr142_app) is loaded via the following path:
insdrv.sh -> rtk_tr142.sh

However I am not sure if it can be easily disabled because it is referenced in the following binary: axel, boa, monitord, omci_app, smuxctl, startup.
You can try nuking it in insdrv.sh and see if the device still boots.

ccom_linkkit is linked inside /bin/startup. Theoretically building a new statically linked ccom_linkkit should work.
CODE

int main()
{
   return 0;
}

Depending if they actually check for error code, you might get away with replacing ccom_linkkit with inert binary like id:
CODE

# cp id ccom_linkkit


Also looks like iot-auth-global.aliyuncs.com is actually dead. Depending on which server you hit, you get a 302 to different location. I did not have the hardware to test this, but it seems hardcoded to lookup using the following DNS server: 223.5.5.5, 223.6.6.6, 8.8.8.8.

Completely untested, all based on static analysis and non expert understanding.

This post has been edited by kwss: Jul 24 2024, 09:15 AM
kwss
post Jul 27 2024, 07:01 AM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(Anime4000 @ Jul 24 2024, 12:36 PM)
I have ARM64 build root, all sus binary replaced with "int main::return 0;" as you mention it, luckily it still boot but usable not tried yet.

all the rucks happen lately, I stop Reverse Engineering on this D-Link DPN series, and remove the firmware download links sweat.gif

I have been told in discord discussion that D-Link DPN-FX3060V has vulnerable, they still didn't tell me how to exploit it, as for this I now didn't care to nuke sus IoT binary out of D-Link, just let them hack the D-Link
*
I reverse engineer ccom_linkkit.
It is basically built on top of AliOS Things, which can be found here:
https://github.com/alibaba/AliOS-Things

The vulnerabilities seems to be many of the components are old and never updated.
After looking at some of the CVE, potentially exploitable in the real world are:
CVE-2024-2466
CVE-2024-23775
CVE-2024-6197

I am limiting my CVE search to within these 2 years based on the state of AliOS Things repo.
No doubt there are other known CVE but I feel they are a bit "hard" to exploit.
If I am the attacker I would just focus on the above CVEs.

I only check for curl, cjson and mbedtls. I did not go look at the other long list of components.
This is really some intense time consuming work.

As for boa, I let this article do the talking:
https://www.theregister.com/2022/11/23/micr...boa_web_server/

This post has been edited by kwss: Jul 27 2024, 07:38 AM
kwss
post Jul 27 2024, 05:53 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
This whole speed drop thing is still a mystery.
It might be malware, might be something else, might be a lot of things.

I don't think I will spend that kind of time to finally prove what caused it. Or maybe I get lucky.

I don't even know where to look right now.
kwss
post Jul 31 2024, 02:43 AM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(MelancholicAnubis @ Jul 30 2024, 03:38 PM)
I having this same exact issue! It's driving me nuts why suddenly my internet will DC and later internet speed dropped to exactly the speed range you mentioned. (Free upgraded 1Gbps plan, and TM said have to change ONU/router to this). It's running in bridge mode currently.

Not sure if complaining to TM will help.. or if there's any way to resolve the issue/root cause.. reboot seems to fix but it's just the temporary for a few days.
*
You should make a fuss out of it to MCMC. I hope the pressure will stop TM from giving ONR to people.
kwss
post Aug 30 2024, 03:12 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(jonathanwhm @ Aug 30 2024, 01:52 PM)
I finally encountered a speed drop issue when my VPN was connected to SG server. Initially, the connection was running at full speed for the first 5-10 minutes after the VPN was established. However, after some time, the speed capped at 320/150. Even after disconnecting the VPN, the speed remained capped at 320/150 until I rebooted the ONU unit.

No speed drop issue so far if I am not using any VPN service after the ONU rebooted. It happened again and again 10 minutes after the VPN was established.
*
Just wondering. Did you torrent or transfer lots of data after you turn on VPN?
If you turn on VPN and do nothing, does the speed still drop?
kwss
post Aug 30 2024, 03:35 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(jonathanwhm @ Aug 30 2024, 03:26 PM)
Yes. The speed is still capped after a certain period, even if I do nothing once the VPN is established. Is it possible to have a capping system that detects the change in the routing and then throttles the speed? hmm.gif  hmm.gif
*
I'm not aware of such thing in D-Link but currently I suspect the 2.5G switch chip is overheating.
In the white D-Link, this external switch chip doesn't exist. All the functionality is provided by the SoC.

Do you happen to put the device in a confined space?

You have experiment and can trigger the speed drop as many times as you want just by connecting to VPN?

What VPN protocol did you use?
kwss
post Aug 30 2024, 03:49 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(jonathanwhm @ Aug 30 2024, 03:44 PM)
The ONU device is placed in an open area, and the temperature is consistently below 20 degrees.

The speed drop only happens when connecting to a VPN (OpenVPN protocol). I tested many times and am pretty sure my line was capped after the VPN was established.
*
Just to be clear. You establish the VPN from your computer and not via the ONR right?
Do you use UDP or TCP for your OpenVPN?

As far as I know, middlebox don't have any special rules for OpenVPN, unlike IKE, GRE or some other protocol.
kwss
post Aug 30 2024, 04:08 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(jonathanwhm @ Aug 30 2024, 04:00 PM)
I tested both on my computer and on my own router (in bridge mode) using the UDP setting. Both are getting the speed capped too.
*
With bridge mode most of the control logic are turned off. Either something is happening at the OMCI or my earlier suspicion, the external switch chip.

But none of these know you are using OpenVPN.

Just to rule out the switch chip:
Can you try iperf between the 2.5G port and the other 1G port?
Just blast them with bi-directional data
kwss
post Sep 1 2024, 05:20 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(micwk @ Sep 1 2024, 01:18 PM)
I recently got upgraded and was given the DPN-FX3060V combo box. Every time I leave the house or disconnect from the home internet, I can’t connect back to the wifi.

I need to restart the router every time in order to make a connection.  Restarting the phone doesn’t work. Is there a way to troubleshoot this?

* the combo box come in default settings done by the technician.
*
Do you happen to use a USB-C dock?
What about other device? Can they reconnect?
What about already connected devices? Do they continue to work?
What if you manually disconnect your phone while you are home? Can it reconnect?
Can you pinpoint it to a single device that cause this issue?
kwss
post Sep 3 2024, 12:22 AM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(micwk @ Sep 2 2024, 10:57 AM)
I am able to connect to the 2.4G without problem but all devices can’t connect to 5G after manually disconnect. Sometimes it also auto disconnect from the 5G
*
Can you try changing the 5GHz Wi-Fi to non-DFS channel?

Did you have this problem since the day you get the D-Link or only these few days?
Do you have non-Apple device? Do they work?
kwss
post Oct 27 2024, 03:54 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(emilyngsc @ Oct 27 2024, 07:25 AM)
Anime4000 can someone write a letter to DM Teo Nie Ching regarding the serious exploit or loopholes?
*
Security is a continuous, persistent and long term practice.
The product owner / developer must not only keep up with CVE but also practice secure software development.

The trouble with home router in general is they don't practice this since their goal is just pump out as many new model as possible.

For this D-Link model, their use of boa after it has long EOL shows they never bother in the first place. It's not possible to fix it without massive overhaul.

Personal opinion: Politician cannot fix this. It's not a one time thing.

TM also have a practice of giving lowest cost stuff and treat them as one off procurement instead of going for long term support.

The only home router with long term support I know is Asus. No other brand offer anything remotely close to their long firmware cycle.

Want security? Go for Enterprise product.

Yes you see product like Cisco has a lot of security vulnerabilities. That's because they actively get reported and fixed.

FYI, boa was discontinued in year 2005, almost 20 years ago. That's a heck of a long time in the security world. It's like running Windows ME in year 2024.

This post has been edited by kwss: Oct 27 2024, 04:03 PM
kwss
post Feb 21 2025, 09:48 AM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
Anime4000
Did the Zyxel has the same GPON SoC as the D-Link?
Is the Zyxel an off the shelf ONR or is it specifically customized for ISP?

The problem with a lot of OpenWRT porting is the board cannot use vanilla kernel due to binary blob.
The specific roadblock I can see in D-Link ONR is all the proprietary initialization sequence are in startup binary. Maybe you can swap those with your own one from PON stick.

But since you have the Realtek SDK, does it comes with the toolchain for the GPON SoC?
kwss
post Feb 21 2025, 01:24 PM

Regular
******
Senior Member
1,207 posts

Joined: Aug 2018
QUOTE(Anime4000 @ Feb 21 2025, 12:47 PM)
Zyxel and D-Link both use same SoC and same Taurus reference board, what I checked for now, only D-Link A1 hardware share quite a lot similarly.

we just have incomplete reverse engineer SDK

but, compile for ARM64 not that hard, like Zyxel did, use OpenWRT tool chain,

see if can use Zyxel kernel and driver on D-Link, if required patching, so be it.

let say DPN-FX3060V A1 has completed OpenWRT Build, still can't update firmware via WebGUI, need flash directly into NAND
*
Do both Zyxel and D-Link has the same mtdblock layout?
If yes then it should be just re-use the "dtb" and "kimage" from D-Link.
Replace all the kernel module in Zyxel "rootfs" with D-Link and it should just boot?

Maybe copy over those OEM config from D-Link too, as it contains the hardcoded mesh key, VoIP config, etc?

 

Change to:
| Lo-Fi Version
0.0169sec    0.37    7 queries    GZIP Disabled
Time is now: 26th November 2025 - 04:30 PM