Jan 3, 2021

Backdoor Discovered in Zyxel Firmware

2020 is a busy start for me, as I need to verify if my Zyxel device is affected by this vulnerability or not.

Zyxel appliance (firewall, VPN gateways, access point controllers) is found to contain a hardcoded admin-level backdoor account that can grant attackers root access to devices via SSH or we administration panel. 

The username and password (zyfwp/PrOw!aN_fXp) were visible in one of the Zyxel firmware binaries. And this vulnerability has been assigned CVE-2020-29583 for tracking. 

Previously, there was a backdoor account tracked as CVE-2016-10401, where Zyxel devices contained a secret backdoor mechanism that allowed anyone to elevate any account on a Zyxel device to root level using the "zyad5001" SU (super-user) password.

Link: Backdoor account discovered in more than 100,000 Zyxel firewalls, VPN gateways | ZDNet

Update 2021-01-10:

Using the zyHell (perl) script from https://donev.eu/ save a lot of my time in verifying the vulnerability.

Jan 2, 2021

Problem with an old IoT (RaspberryPi)

One problem when we work on the old raspberry pi is, we can hardly remember all the pinouts on those old model. I've an old Raspberry Pi that is an old model B with 512mb. 

And I'm try to find the power and the ground pins. When I turn to Google, most of the GPIO pinout is either for RPi4 or Rpi3.

At last, I found a way to solve my problem. 
 
First, I install a python package python-gpiozero (or python3-gpiozero). 
 
$ sudo apt install python-gpiozero
 
Then I run the command "pinout", as below, and I found the right pins (4/6) for me. ;)

Dec 31, 2020

What is IoC?

IoC stands for Indicator of compromise.

Indicator of compromise (IoC) in computer forensics is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion.

Links:

  • https://en.wikipedia.org/wiki/Indicator_of_compromise
  • https://azeria-labs.com/iocs-vs-ttps/

 

What is TTP?

TTP stands for Tactics, Techniques and Procedures.

Tactics, Techniques, and Procedures (TTPs) is an essential concept in terrorism and cybersecurity studies. The role of TTPs in terrorism analysis is to identify individual patterns of behavior of a particular terrorist activity, or a particular terrorist organization, and to examine and categorize more general tactics and weapons used by a particular terrorist activity, or a particular terrorist organization.

Links:

  • https://en.wikipedia.org/wiki/Terrorist_Tactics,_Techniques,_and_Procedures
  • https://azeria-labs.com/iocs-vs-ttps/

Internet Exposure of DNS-over-TLS

DNS-over-TLS (DoT) (TCP/853)

Encrypting DNS is great! Unless it's baddies doing the encrypting.


TLDR

  • WHAT IT IS: DNS over TLS is just what it says on the tin: the DNS protocol embedded in a TLS connection, ostensibly to make your DNS request more confidential.
  • HOW MANY: 3,237 discovered nodes. A hodgepodge mix of vendor/version information was discernible, but you’ll need to read the details to find out more.
  • VULNERABILITIES: Whatever is in the DNS that backs the service or in the code that presents TLS (more often than not, a plain, ol’ web server).
  • ADVICE: It’s complicated (read on to find out why!)
  • ALTERNATIVES: Plain, simple, uncomplicated, and woefully unconfidential UDP DNS; DNS over HTTPS (DoH); DNS over QUIC (DoQ); DNS over avian carriers (DoAC).
  • GETTING: Drunk with power. There are nearly two times as many as April 2019.
At face value, DNS over TLS (henceforth referred to as DoT) aims to be the confidentiality solution for a legacy cleartext protocol that has managed to resist numerous other confidentiality (and integrity) fixup attempts. It is one of a handful of modern efforts to help make DNS less susceptible to eavesdropping and person-in-the-middle attacks.

Discovery details

We chose to examine DoT because web browsers have become the new operating system of the internet, and DoT and cousins all allow browsers (or any app, really) to bypass your home, ISP, or organization’s choices of DNS resolution method and resolution provider. Since it’s presented over TLS, it can also be a great way for attackers to continue to use DNS as a command-and-control channel as well as an exfiltration channel.

We chose to examine DoT versus DoH because, well, it is far easier to enumerate DoT endpoints than it is DoH endpoints. It’s getting easier to enumerate DoH since there seems to be some agreement on the standard way to query it, so that will likely make it to a future report.

In case you have been left unawares, Google is a big player] in the DoT space, but it tends to concentrate DNS exposure to a tiny handful of IP addresses (i.e., that bar is not Google-proper). When we filter out CleanBrowsing (yep, they’re everywhere), we’re left with the major exposure in Google being … a couple dozen servers running an instance of Pi-hole (dnsmasq-pi-hole-2.80, to be precise). Cut/paste that finding for OV and DigitalOcean and yep, that same Pi-hole setup is tops in those two clouds as well.

You don’t need to get all fancy and run a Pi-hole setup to host your own DoT server. Just fire up an nginx instance, create a basic configuration, set up your own DNS behind it, and now, you too can stop your ISP from snooping your DNS queries.

Exposure information

Here is where we’d normally talk about versions and CVEs, etc., but the DoT situation is complicated by a few things. First, we have big players in this space using proprietary solutions, so version fingerprints such as  “CleanBrowsing v1.6a” are not very useful information. Second, should we focus on the version of the web server or of the back-end DNS server (or, both)? The latter might not be useful, since you can configure an nginx DoT setup to proxy to a third party, and that’s what will get picked up in the response. 

Attacker’s view

There are no DoT honeypots in project Heisenberg, but DoT is just a TLS wrapper over a traditional DNS binary-format query. When we looked for that in the TCP/853 full packet captures, we saw us (!) and a couple other researchers. Not very exciting, but with the goal of DoT being privacy, we really shouldn’t see random DoT requests.

Attackers are more likely to stand up their own DoT servers or reconfigure other DoT servers to use their DNS back-ends and then use those as covert channels once they gain a foothold after a successful phishing attack. This is a big reason we enumerate/catalog DoT, and we’re starting to see more DoT in residential ISP space and traditional hosting provider IP space. It looks like more folks are experimenting with DoT with each monthly study.

Our advice

IT and IT security teams should block TCP/853, lock down DoT and DoH browser settings as much as possible so there is no way to bypass organizational IT policies, and monitor for all attempts to use DoT or DoH services internally (or externally). In other words, unless you’re the ones setting them up, disallowing rogue, internal DoT is the safest course.

Cloud providers should consider offering managed DoT solutions and provide patched, secure disk images for folks who want to stand up their own. (This is one of the few cases where organizational advice and cloud advice are quite nearly opposite.)

Government cybersecurity agencies should monitor for malicious use of DoT and provide timely updates to the public. These centers should also be a source of unbiased, expert information on DoT, DoH, DoQ (et al).

Links:

  • https://www.rapid7.com/blog/post/2021/01/15/nicer-protocol-deep-dive-internet-exposure-of-dns-over-tls/