preeny icon indicating copy to clipboard operation
preeny copied to clipboard

Struggling with Desock

Open tomirio619 opened this issue 8 years ago • 2 comments

Hello,

I'm trying to use preeny to be able to fuzz StrongSwan, which is an IPsec implementation. I make use of a named pipe to feed my input to the process (which works with the test case provided by preeny) When enabling debug and starting StrongSwan, it tells me that the following happened (using desock):

--- synchronization of fd 0 to 510 shutting down due to read error ''

During loading of the process, it does throw a couple of warnings: (from StrongSwan's side):

00[NET] unable to set IP_PKTINFO on socket: Operation not supported
00[NET] could not open IPv6 socket, IPv6 disabled
--- Emulating bind on port 500
00[NET] unable to set IP_PKTINFO on socket: Operation not supported
00[NET] could not open IPv4 socket, IPv4 disabled

When I switch to desock_dup, it does not respond to any input. Again, it gives me some warnings:

00[NET] changing socket permissions for 'unix:///var/run/charon.ctl' failed: No such file or directory
--- Emulating bind on port 12150
00[NET] changing socket permissions for 'unix:///var/run/charon.vici' failed: No such file or directory

I've not been able to figure out what is causing this. I was wondering if you guys have any idea how this can be fixed.

Kind regards, Tom

tomirio619 avatar Nov 27 '17 15:11 tomirio619

It looks like it's doing operations on that socket that preeny doesn't intercept. To solve that, you'll need to figure out what functions it's calling (using ltrace or something) and add them to desock.c. That's a good place to start, at least.

zardus avatar Nov 27 '17 20:11 zardus

Thanks for your quick response. I will start my search from there

tomirio619 avatar Nov 27 '17 21:11 tomirio619