News for hackers. Stuff that matters.
[dead]
Re:Vulnerability Management for Go by psanford on Tuesday September 06, 2022 @11:47AM (#32738743)
What? How does a piece of code that isn't compiled into your binary make you vulnerable?
Re:Vulnerability Management for Go by auspex on Wednesday September 07, 2022 @12:19PM (#32752623)
I should have been more clear that I was referring to external dependencies that are included. I did some research and there’s so much extra stuff included in the go.sum. You’re right that would result in a lot of false positives.
Re:Vulnerability Management for Go by masklinn on Tuesday September 06, 2022 @12:09PM (#32739122)
> Just because you don’t link to or call it… if you include vulnerable code you’re still vulnerable.

That makes no sense. If you never use the vulnerable code, how would an attacker access the vulnerability through your system? Especially with DCE, the vulnerability might not even be in the binary.

Re:Vulnerability Management for Go by tptacek on Tuesday September 06, 2022 @12:03PM (#32739013)
No, this is not at all a valid argument.
Re:Vulnerability Management for Go by freeqaz on Tuesday September 06, 2022 @01:15PM (#32740080)
The only argument I can think of here is with NPM post install hooks. But for Golang, unless you import the code, I'm pretty certain that there is no way to exploit or backdoor an app.

Or is there something I'm missing?

Re:Vulnerability Management for Go by ikiris on Tuesday September 06, 2022 @02:00PM (#32740692)
I guess I just found an interview question. Thanks!
Re:Vulnerability Management for Go by sunbum on Wednesday September 07, 2022 @09:19AM (#32750173)
Good way to weed out good developers!
Re:Vulnerability Management for Go by ikiris on Wednesday September 07, 2022 @09:30PM (#32759856)
No, I meant anyone who believes this is weeded out.
Re:Vulnerability Management for Go by umvi on Tuesday September 06, 2022 @11:48AM (#32738772)
Well if RCE is possible, then why is it going to matter if you have uncalled vulnerable functions or not? Attacker can execute anything they want.
Re:Vulnerability Management for Go by Someone on Tuesday September 06, 2022 @11:59AM (#32738954)
Not necessarily. RCE may start with being able to run ‘something’ that has restrictions such as “can’t inject code that has zero bytes in it” or “injected code can only be X bytes long”.

In such cases, having another vulnerability available may be the easiest way to get rid of those restrictions.

Also, the second vulnerability may be complementary. For example, the first may get you onto the machine, but not out of the sandbox, while the second won’t get you on the machine, but will get you out of the sandbox.

In this case, I think the go linker won’t include the never-called vulnerable function in the executable (it only would if the vulnerability checker were smarter than the linker in detecting never-called code. That’s theoretically possible, but highly unlikely)