News for hackers. Stuff that matters.
Re:Abusing GDB Features for Data Ingress and Egress by overbytecode on Monday October 23, 2023 @02:44PM (#37989853)
I’m confused, why would the debugging information file be an executable? These are just debugging symbols, no?
Re:Abusing GDB Features for Data Ingress and Egress by matthews2 on Monday October 23, 2023 @03:10PM (#37990191)
The debug info is stored in an elf file, just like an executable. You can have them together in the same file, or you can use a tool like objcopy to make them separate.
Re:Abusing GDB Features for Data Ingress and Egress by mschuster91 on Monday October 23, 2023 @04:34PM (#37991208)
> or you can use a tool like objcopy to make them separate

which is how Debian generates the -debug packages [1].

[1] https://github.com/Debian/debhelper/blob/master/dh_strip

Re:Abusing GDB Features for Data Ingress and Egress by brancz on Monday October 23, 2023 @05:08PM (#37991613)
DWARF is touring complete and not the accidental kind, it has instructions and all. GDB implements the whole set so you can basically make GDB do arbitrary code execution if you control the DWARF data.
Re:Abusing GDB Features for Data Ingress and Egress by jcranmer on Monday October 23, 2023 @11:52PM (#37994704)
As far why it's not accidental, one of the primary purposes of DWARF is to be able to essentially describe "this source-level value is described by f(memory, registers)". Even if you wanted to restrict it to just the simple conditions like "this is described at stack offset N", there are cases where there might be variably-sized objects on the stack, and so you'd need to run a small function just to compute "N".
Re:Abusing GDB Features for Data Ingress and Egress by not2b on Monday October 23, 2023 @03:29PM (#37990407)
The security issues are already clearly warned about: the debug info must come from a trustworthy server. But I don't see why a black hat would choose this attack vector. They would have to wait for a developer to debug a binary with shared libraries, while fetching debug info from a a corrupted server. The developer would most likely be using a server provided by a distro (say, Red Hat/Fedora), and if a bad guy can replace the debuginfo files on such a server, they can just as easily replace RPMs directly and feed users malware.
Re:Abusing GDB Features for Data Ingress and Egress by tovej on Monday October 23, 2023 @04:12PM (#37990916)
Yes, it would me more notable if a client could somehow compromise the server, which may work theoretically as an internal attack vector in a software dev organization.

I agree that compromising a distro server is unlikely, but I suppose a mitm attack could be plausible though, and this would give arbitrary code execution.

EDIT: or is it ACE? The article seems to emphasize sending arbitrary _data_ to the client, so now I'm confused. If you can make the binary print something else, surely you have ACE? Or do you have to step through the code?

Re:Abusing GDB Features for Data Ingress and Egress by jmprspret on Monday October 23, 2023 @11:46PM (#37994680)
I kind of agree. But another aide to it is that it would be cool to see in a CTF type challenge.