Moodle cron jobs detect as suspicious activity

Re: Moodle cron jobs detect as suspicious activity

by Ken Task -
Number of replies: 2
Picture of Particularly helpful Moodlers

Staging hosts are prime targets if not maintained like production servers - they usually aren't.  How about yours?

/opt/cpanel/ea-php72/root/usr/bin/php is Easy Apache and set to PHP version 7.2 and under cPanel ... looks to be the path one would use in set up of the operating system cron job on your 192.168.10.58 (private IP) server.

On staging server are you allowing the running of cron via the web?  

Probably should set that to command line only and then make sure the cron job is set appropriately (correct path).   If set so, that runs locally on server and any web based access to it is denied.

Since we see cPanel is involved, is cPanel code up to date? 

Also ... 7fdd21b62000-7fdd21b65000 ... is that reference CloudFlare ray?  And are you sharing a CloudFlare log?

Since CloudFlare acts as not only a content delivery server in front of web servers set up with it but also a WAF could be someone outside is poking and probing ... now-a-days that happens daily and from a number of 'bad actors' and bots.

What would be of major concern (to me) would be the web service error logs for the staging server.  IF funny business found in them, CloudFlare not doing it's job in protecting ... or bad actors bots are by passing CF.

So check logs of staging server itself.  If setup is working correctly, think one would see the IP address of CloudFlare servers only and not any other IP's.

My 2 cents!

'SoS', Ken

In reply to Ken Task

Re: Moodle cron jobs detect as suspicious activity

by James Peter -
Thank you Ken for your detailed reply
Actually we are not using CloudFlare
On staging server are you allowing the running of cron via the web? - No
Since we see cPanel is involved, is cPanel code up to date? - Yes
In reply to James Peter

Re: Moodle cron jobs detect as suspicious activity

by Ken Task -
Picture of Particularly helpful Moodlers

Early posting you shared:

192.168.10.58: 51858 -> 104.22.65.81:443 )

The 192.168.10.58 IP is a private IP.   But the 104.22.65.81 IP is CloudFare me thinks:

dig -x 104.22.65.81

Doesn't show a ptr record in DNS but the SOA shows cloudflare:

;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;81.65.22.104.in-addr.arpa.    IN    PTR

;; AUTHORITY SECTION:
22.104.in-addr.arpa.    388    IN    SOA    cruz.ns.cloudflare.com. dns.cloudflare.com. 2034580120 10000 2400 604800 3600

'SoS', Ken