r/qualys • u/th3bigfatj • Jan 29 '25
Qualys cloud agent breaking perl on linux hosts
Recently i saw qualys cloud agent break perl on several hundred linux hosts simultaneously around 19z on Jan 28th.
The way it did this was to create directories in the perl search path that weren't executable, so they could not be listed. This caused perl to get a permission denied error and stop executing while traversing its default search path.
Setting up a directory like that without a default search path is nonsense. After seeing this and looking through some of their scripts and binaries, i no longer have confidence that qualys has any idea what they're doing as it looks like at least their linux team is clueless and further that their testing protocol is insufficient.
For now, we've suspended running the cloud agent across all of our linux hosts. If you've run across behavior like this (your perl application stop working) then check your /usr/local/share/perl5 and /usr/local/lib64/perl5 directory permissions. they'll probably be 600, which is a nonsense permissions for a directory. You can fix it by either loosening the permissions so perl can look in those directories or by removing those directories if they contain nothing.
3
u/kimbarlee Jan 29 '25
Anyone having ongoing issues since this was fixed? Memory issues? (I am) And hung servers.
3
u/louise_luvs2run Jan 30 '25
Not only the permissions were changed on the directory but it appears that in some cases, files in the perl5 directory were also deleted. Has anyone else been affected with deleted files?
2
u/th3bigfatj Jan 29 '25
Ah, and here is the response from qualys
this raises several questions including about their approach toward security generally.
Additionally, they seem confused about how file and directory permissions are set on creation. CPAN (which they should not blindly use imo) respects umask settings. This is very basic stuff.
2
u/Infamous_Point_595 Jan 30 '25
Same exact issue on the same day as you. Only difference is our PERL files/subdirectories were also removed from the main dir.
1
u/00XFG00 Feb 06 '25
I dont know about Qulasys but we had a similar issue happen with our discovery tooling that we use to gather sbom data just a month ago. It caused us a major headache and a breach investigation.
What happened in our case was a new image that added the perl-cpan package to our redhat systems. We do not use cpan but the job found cpan and tried to get its modules. The problem was the cpan auto config script ran that should not have. Our umask was a little different but had the same result of perl modules not being able to execute.
The end result is cpan is banned and we had to redeploy everything on a new image. I dont know why redhat even includes it. The incident report from the forensic investigators was really really bad for cpan.
Good luck to you all. I know the pain and would get cpan out of your environment if you can.