1. Current Location: Home >  Router Encyclopedia >  HTTP and HTTPS capture packets, and the plaintext even shows the server version

HTTP and HTTPS capture packets, and the plaintext even shows the server version

Illustrated difference between HTTP and https: Comparison between plaintext on port 80 and encrypted on port 443, three things to do with HTTPS locks, and three situations where browsers are not safe to treat tables

The

incident started when my wife was out of town and wanted to upload photos of our NAS. A whole page of red warnings popped up on the webpage: 'Your connection is not private.' She took a screenshot and sent it to me: Has our NAS been hacked? I glanced at it and laughed—that was a certificate I signed for myself, just not recognized by the browser. I just clicked advanced to continue visiting. But she wasn't at ease and kept asking me when to pay attention to this warning and when not to take it. I was stunned—I see this every day, but I've never really thought about it from the beginning. That night, I wrote a dozen lines of packet capture script in Python, connecting http and https respectively. After reading the output, I finally understood what that browser lock was actually locking.

Let's grab a packet first: port 80 is completely naked, port 443 is all garbled text

No matter how the book defines it, even doing it once is easier to understand than reading ten popular science articles. I use a Python socket, which is the most basic bare connection. First, I connect to an HTTP site's port 80 and manually send the simplest GET request. The returned item is printed directly on the screen, looks like this:

HTTP/1.1 403 Forbidden / Date: Sat, 03 Oct 2026 / Server: Apache/2.4.68 / Content-Type: text/html

Look closely, this back-and-forth is full of human speech. Every device on the road can read the software, version, minute, and type of page the server uses. This is just an ordinary page without an account. If this were an HTTP login page, the username and password you type would be in plaintext, running naked from your router, optical modem, carrier data center, to the other server. Whenever someone wants to see a section of the road, grab a bag and you'll have it all.

Then I aligned the same bare connection with port 443, which is the port used for https. This time, no matter what I sent, the other party only replied with five bytes: \x15\x03\x03\x00\x02\x02. This isn't garbled text error; it's the TLS protocol telling me, 'Your handshake is wrong, try again.' From this moment on, every serious word spoken between the two sides had to be encrypted, and every package caught along the way was this abrupt ByteDance. On the same website, 80 and 443 have two doors: one opens its door for chatting, the other first sets the password before closing it. This is the fundamental difference between HTTP and HTTPS.

What was that little lock locking: three things, missing even one of them didn't count

That little lock in the address bar doesn't just focus on "encryption"—it does three things at once. First, encryption—you can't peek, and if you catch a packet on the road, you'll only see garbled text, with your account password and chat content all inside. Second is integrity: if you can't change it, even if half a byte of data is altered halfway, the receiver can check and discard it immediately; Third, the identity is not impersonation. If you connect to a shunot.com, a third party will come to guarantee this is a shunot.com server, not an identical fake page set up by hackers next door.

The third thing is the certificate. A certificate is like a letter of introduction stamped by a notary office, stating whose domain it owns, when it expires, and who guarantees it. I used curl's verbose mode to check my site's certificate, and the output explained the issue well: SSL connection using TLSv1.3 / subject: CN=shunot.com / issuer: Let's Encrypt。 Translated: TLS 1.3 for encryption, domain name shunot.com, guarantor by Let's Encrypt, a public certificate authority. The browser recognizes Let's Encrypt, so it doesn't trigger warnings.

By the way

, in the old days, you had to pay to buy a certificate to access HTTPS, but now institutions like Let's Encrypt offer it for free and automatically renew after three years, so almost all the legitimate websites you see online use HTTPS. The rest still running HTTP are mostly router backend pages that "only browse your own home," which leads to the following question.

The browser prompts "Not Safe"—three scenarios, three different treatments

Once you figure out what Xiao Suosuo is, you can give various triage prompts. I made a list for my wife, showing three situations and three attitudes:

: Should you to the backend, do . ,
Typical scenariospay attention
internal network HTTP page 192.168.1.1 router backend or optical modem? Basically, you don't need to pay attention to
the public HTTP login pageOn account login pages starting with httpnot enter passwords
On the certificate alert page, a red text pops up in the background for NAS and router HTTPSconfirming it's your device, then continue

First, let's talk about the first point: why do I still feel comfortable using HTTP in the background of the router? The 192.168.1.1 address doesn't require going out at all; data only travels a two-meter network cable between your home WiFi and router, with no carrier or public network in between. To capture this explicit text, you have to sneak into your home network first, and those who can get into your WiFi can change your router settings without needing to capture packets—just log in to the background. So the risk is not explicitly stated. I wrote about the WiFi password lock in the WPA2 and WPA3 articles. That is for the wireless section, while HTTPS is for two different paths.

The second option is beyond discussion. Any page starting with HTTP that asks you to enter your account and password is like writing your password on a postcard and sending it out. Even worse, when ISPs or public WiFi sites insert ads into HTTP pages, pop-ups appear for no apparent reason. I wrote in the article routers getting hacked about how to troubleshoot them. Essentially, it's plaintext pages where anyone can edit twice. Hotel WiFi and mall free internet—especially don't touch the HTTP login page.

Why can you

click "Continue accessing" when NAS has those scary red alerts

?

The third type is the kind the wife encounters, which is also the easiest to scare people. When your NAS or router opens HTTPS in the background, most certificates are signed by the device itself. The introduction letter is written by the device, and the seal is carved by the user. If the browser doesn't recognize this guarantor, it will pop up a whole page of red text. This doesn't necessarily mean it's being hated; it just means "no one endorses this device."

There's only one way to judge: confirm that you're really connected to your own device and that the network environment is trustworthy. On the home WiFi, enter the NAS internal network address, and the red text says the self-visa form or expired certificate, so feel free to go for more advanced access and continue accessing it. Conversely, if you access any remote device under hotel networks or unfamiliar WiFi, the certificate may appear incorrect, or if the red text says "The certificate does not belong to this domain" or "The certificate was issued by an unknown organization but you think it must be a big company," don't click continue; try switching to mobile data first. I previously wrote < a href="https://www.shunot.com/en/nas/1063.html" > how to launch WebDAV, mentioning that Synology's encrypted port 5006 paired with the phone's file app will mumble a couple of times the first time you connect your phone, trust it once, and remember it—it's the same thing.

So that time, my wife remotely instructed her to verify two things: whether the server name in red was for our NAS, and whether she was connected to our broadband. All right, click continue, done. She said it scared me to death. I said the red text blocked people who "dare to go down without verifying," and the original intention was good.

Conversely: Why does losing 192.168.1.1 get forced to jump https and then fail to open

?

There's also a reverse pitfall, let me clarify. Some people enter 192.168.1.1 in their browser and it automatically changes to https://192.168.1.1, but then the router won't open in the background no matter what, and the screen spins white. Because the router's backend only opens the HTTP door, and the browser upgrades you to HTTPS by memory, which means you knock on the wrong door and blame the other party for not opening it. This has nothing to do with whether the device is broken or not. The solution is to enter the full address, add the http:// prefix, and press Enter. Mobile browsers love to do this. I < the post >where I logged into the router backend a href="https://www.shunot.com/en/192-168-1-1/959.html", and I wrote a bit about this pitfall. If no matter how much you type, it still pops up. Try a different browser or clear the site's data. If the browser records 'This site must be https', it's invalid. the login page won't open. The article has a complete troubleshooting order.

Which doors should be locked and which don't matter: pause for two seconds before entering the password

At home, I divided all the networked devices into two levels in the background. HTTPS required: those accessible from the public network, such as the NAS remote backend, router remote management page, and monitoring remote page. These are true 'postcard travels.' Once you go to HTTP, the password is exposed on the public network, and with just one password in these backends, you can access all your data. I wrote about the consequences of public network exposure in my article on NAS ransomware. If the device itself doesn't support HTTPS, don't expose its background directly to the public network. Either use the VPN home route, or simply turn off remote settings. Nothing about HTTP: Only run in the backend of your own internal network—router, optical modem, printer. Just set the backend password. The risk of plaintext is just eight miles behind the password or admin.

Develop a two-second habit: before entering a password on any page, take a quick look at the beginning of the address bar. https starts with a closed lock, lose; login pages starting with http, stop; On the red alert page, first confirm who is connected before deciding. This habit costs nothing, and works better than any security software. I also checked the router's backend to see if there are unfamiliar port mappings. That's another door I often forget to close. I wrote about this in the article UPnP. The door was guarded; Mingwen, the naked, the impersonator, couldn't get in.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《HTTP and HTTPS capture packets, and the plaintext even shows the server version》
Article URL: https://www.shunot.com/en/lybk/1117.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow