Next: , Previous: , Up: Top   [Contents]


1 What is LibHideIP?

LibHideIP is a set of replacements for those function that could be used to find your local public IP address. These functions include: ‘gethostent’ family, ‘getipnodebyaddr’, ‘getipnodebyname’, ‘gethostname’, ‘gethostbyaddr’ family, ‘gethostbyname’ family, ‘getifaddrs’, ‘getaddrinfo’, ‘getnameinfo’, ‘socket’+‘socketpair’ (netlink sockets), ‘sendmsg’+‘recvmsg’, ‘execve’ (thus the whole ‘exec...’ family) with the ‘system’ function (can be used to launch bad programs), ‘ioctl’, ‘uname’, the ‘bind’ family, ‘getsockname’, ‘getsockopt’+‘setsockopt’, a bunch of file opening functions (‘fopen’, ‘fopen64’, ‘open’, ‘open64’, ‘freopen’, ‘freopen64’, ‘openat’, ‘openat64’) which can be used to read IP addresses from files under /proc and some of the functions from the libpcap library, to prevent raw opening of network devices.

There is NO NEED to rebuild your software, because LibHideIP is a pre-loadable library, meaning you just need to RUN the software with LibHideIP loaded.

Intercepting the raw ‘syscall()’ function is impossible, because the number of parameters varies from one syscall to another.

However, there are limitations. LibHideIP can do nothing if:

Additionally, GUI applications may show errors similar to ‘cannot connect to X server’ when starting if the $HOME/.xauth* file contains the real hostname instead of just ‘localhost’. Check the compiling options (How to compile?) for a work-around.

LibHideIP is also a library for programmers - look inside ${includedir}/ (default is /usr/local/include) for a header file with all the functions - libhideip.h, and look inside ${libdir}/ (default is /usr/local/lib) for an "import library" - libhideip.a.

NOTE To use LibHideIP as a development library, pass --enable-public-interface to ./configure and include the header BEFORE any system headers. Compile-time errors may occur otherwise. Remember to link your program with LibHideIP - adding -lhideip (optionally preceded with -L ${libdir}) to GCC is enough. See the chapter on developing to learn how to use LibHideIP (Developing).

LibHideIP’s homepage is https://libhideip.sourceforge.io.


Next: , Previous: , Up: Top   [Contents]