MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

DevSecOps: Your AWS Abuse Report – scanning remote hosts on the internet for security vulnerabilities

Incidents

It has been implicated in activity which resembles scanning remote hosts on the internet for security vulnerabilities. Activity of this nature is forbidden in the AWS Acceptable Use Policy (https://aws.amazon.com/aup/). We’ve included the original report below for your review.

This is a notification of unauthorized uses of systems or networks.

We have observed IP addresses from your network probing my servers for TCP open ports. Due to their dubious behavior, they are suspected to be compromised botnet computers.

If you regularly collect IP traffic information of your network, you will see the IPs listed connected to various TCP ports of my server at the time logged, and I suspect that they also connected to TCP ports of many other IPs.

If a Linux system was at the attacker’s IP, you might want to use the command “netstat -ntp” to list its active network connections. If there is still some suspicious connection, find out what PID/program/user ID they belong to as you might find something to help you solve this problem.

In addition to the above, kindly notify the victims (owners of those botnet computers) as this will assist them in taking the appropriate action to clean their computers. Once this action is completed, not only will it prevent severe incidents such as data leakage and DDos but, it will also stand off botnets from taking up your network bandwidth.

Solution

Step – 1 – Investigate the Process

Netstat -ntp output listing TCP connections on ports 443 and 80 with states and httpd PIDs

$ netstat -ntp
$ ps -p 207082 -o command=
$ ls -l /proc/207082/exe

Bash commands ps -p 207082 -o command= and ls -l /proc/207082/exe to inspect a suspicious process

Step 2 – Check for Service Units or Cron Jobs

The process might be started by a systemd service or a cron job:

  • Systemd service: Check for custom systemd service files in /etc/systemd/system/ or /lib/systemd/system/ and use systemctl to list all services to see if any custom or suspicious service is running.
Bash commands to list systemd services, check crontab for users and root, and list /etc/cron directories

Step 3 – Stop and Disable the Process


If the process is managed by a systemd service, disable and stop it:


$ sudo systemctl stop servicename.service
$ sudo systemctl disable servicename.service

If it's a cron job, remove or comment out the line in the crontab.

Step 4 – Remove Executable and Clean Up


After identifying the executable, consider carefully removing it if it's confirmed to be malicious or not needed:

$ sudo rm /path/to/executable

Be cautious, as removing system files or legitimate processes can harm your system.

5. Further Security Measures

  • Rootkit Check: Since this process appears suspicious, it’s a good idea to run a tool like rkhunter or chkrootkit to check for rootkits.
  • Malware Scan: Use a Linux-based antivirus tool to scan your system for malware.
  • Audit Logs: Check /var/log/auth.log, /var/log/syslog, or relevant system logs for any unusual activity, especially around the times the process was started.
  • System Updates: Ensure your system and all applications are up-to-date with the latest security patches.
  • Firewall Review: Verify your iptables rules and ensure no unwanted rules are allowing traffic through.
  • Network Monitoring: Monitor outbound and inbound connections for further suspicious activities.

CULPRIT#1

I see the process was getting created by daemon user and through crontab

Sudo crontab -u daemon -l output showing malicious jobs running sh18 and init18 from /tmp, /var/tmp and /var/lock
file /var/tmp/bash18
file /var/tmp/sh18
file /var/tmp/init18

file /var/bash18
file /var/sh18
file /var/init18

file /var/lock/bash18
file /var/lock/sh18
file /var/lock/init18Code language: JavaScript (javascript)

Investigation Further -> How this code was added in Crontab?

I am wondering how these executable such as bash18, sh18 and init18 is set in user daemon crontab using XAMPP. Any clue?

To search through your JavaScript (.js) and PHP (.php) codebase for patterns that might indicate code responsible for adding cron jobs, you can use the grep command in Linux.


Basic grep Search
This searches all PHP and JS files for the word "crontab":

$ grep -r --include=\*.{php,js} "crontab" .

Search for Shell Execution Functions

Many malicious scripts use PHP's shell execution capabilities (exec, shell_exec, system, passthru, and backticks) to run system commands.


$ grep -r --include=\*.php "\(exec\|shell_exec\|system\|passthru\|`\)" .

This command will search for any of the mentioned functions in PHP files. Note the use of backslashes to escape certain characters and the use of \| to indicate an "OR" condition.

Searching for Suspicious Base64 Encodings

Malicious code is often encoded in Base64 to obfuscate its presence. Searching for Base64 encoded strings can sometimes uncover hidden malicious code.


$ grep -r --include=\*.{php,js} "base64_decode" .Code language: PHP (php)

List Crontabs for All Users

To view the crontab entries for all users, you can check the crontab files stored in /var/spool/cron/crontabs/ (for most Linux distributions). Use the following commands:

for user in $(cut -f1 -d: /etc/passwd); do
  echo "Crontab for user: $user";
  sudo crontab -l -u $user 2>/dev/null;
doneCode language: JavaScript (javascript)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Elastic Agent Commands Reference

Elastic Agent runs as an operating system service, so you start and stop it with systemd on Linux, launchd on macOS and the Service Control Manager on…

Read More

Which Cyber Threats Should Your IT Team Tackle First?

Your on-call engineer is patching a gateway as cyber threat alerts pile up, but nobody has said why a suspicious cloud session outranks an endpoint warning from…

Read More

Jira on Linux: Installation and Configuration with Safer Service and Firewall Setup

Learn how to install Jira on Linux using Atlassianโ€™s installer, manage it as a service, and expose port 8080 safely. This revision keeps the original references but updates the process for clearer, production-minded operations.

Read More

Dark Web Explained for DevOps: What It Is, What It Isnโ€™t, and How to Reduce Risk

The dark web is a small, intentionally hidden part of the internet, often confused with the deep web. This guide explains the differences and gives DevOps teams practical steps to detect leaks, rotate secrets, and harden delivery pipelines.

Read More

MySQL Basic Troubleshooting Guide: Service, Port 3306, Logs, and Crash Repair

This Linux-first runbook helps you troubleshoot common MySQL issues quickly, from startup failures to port conflicts and slow performance. You will learn practical checks for service health, configuration, logging, and table repair.

Read More

Top MDR Providers for Enterprises: Evaluation Criteria and Vendor Comparison for 2026

Almost every comparison guide in this market is published by a company that sells the thing being compared. And funnily enough, that company usually comes out looking…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x