Ahh..thanks Paul!<div><br></div><div>Is there a better way to intercept outbound network access calls while avoiding af_unix?<span></span><br></div><div><br></div><div>I assume <font><span style="background-color:rgba(255,255,255,0)">sockaddr_storage is just a different size (I think 128?)</span></font></div><div><font><span style="background-color:rgba(255,255,255,0)"><br></span></font></div><div><font><span style="background-color:rgba(255,255,255,0)">Thanks </span></font></div><div>Farhan</div><div><div><br>On Thursday, February 5, 2015, Paul Moore <<a href="mailto:paul@paul-moore.com">paul@paul-moore.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Feb 4, 2015 at 8:19 PM, F Rafi <<a href="javascript:;" onclick="_e(event, 'cvml', 'farhanible@gmail.com')">farhanible@gmail.com</a>> wrote:<br>
> After some log analysis it looks like filtering on "a2=10" only shows<br>
> network activity. From what I understand, this is the address length (int<br>
> addrlen) argument in the sys_connect function.<br>
><br>
> Traced it down to this comment in socket.c. Sounds like filtering for a2=10<br>
> and a2=18 (to account for IPv6) may work.<br>
><br>
> #define MAX_SOCK_ADDR 128<br>
> /* 108 for Unix domain -<br>
> 16 for IP,<br>
> 16 for IPX,<br>
> 24 for IPv6,<br>
> about 80 for AX.<br>
> 25 must be at least one bigger than the AF_UNIX size (see netunix/af_unix.c<br>
> :unix_mkname())<br>
>  */<br>
><br>
> 10 hex = 16 dec and 18 hex = 24 dec<br>
><br>
> I hope someone can correct me if I sound like I'm not all there.<br>
<br>
[Ooops, hit "reply" instead of "reply-to-all"]<br>
<br>
A few things come to mind with this approach:<br>
<br>
* This will not work on x86 due to the socketcall() syscall multiplexer.<br>
<br>
* This doesn't solve the problem for applications that leverage the<br>
address family independent sockaddr_storage structure.<br>
<br>
--<br>
paul moore<br>
<a href="http://www.paul-moore.com" target="_blank">www.paul-moore.com</a><br>
</blockquote></div></div>