Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fake IKE PSK+XAUTH IPsec semi-MITM attack daemon https://www.roe.ch/FakeIKEd
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
/* * fiked - a fake IKE PSK+XAUTH daemon based on vpnc * Copyright (C) 2005,2009 Daniel Roethlisberger <firstname.lastname@example.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see http://www.gnu.org/copyleft/ */ // Overview This is a fake IKE daemon supporting just enough of the standards and Cisco extensions to attack commonly found insecure Cisco PSK+XAUTH VPN setups. Basically, if you know the pre-shared key, also known as shared secret or group password, you can impersonate the VPN gateway in IKE phase 1, and learn XAUTH user credentials in phase 2. This attack [2,3] is not new. It has been known for a long time that IKE using PSK with XAUTH is insecure, and this is not the first actual implementation of the attack. The configuration supported by fiked is IKE aggressive mode using pre-shared keys and XAUTH. Supported algorithms are DES, 3DES, AES128, AES192, AES256; MD5, SHA1; and DH groups 1, 2 and 5. Main mode is not supported. Based on this work, a full MITM attack could be implemented. // Attack Setup To successfully demostrate an attack on a VPN site, you need to know the shared secret, and you must be able to intercept the IKE traffic between the clients and the VPN gateway. There are several ways to find out the shared secret , and several ways to redirect the IKE traffic to your running fiked instance. With the -r option, you can control whether fiked should forge the source address on packets or not, depending on whether your particular attack setup needs it or not. // Installation You need these libraries to build and run fiked: * libgcrypt >= 1.1.90 http://directory.fsf.org/security/libgcrypt.html * libnet >= 1.1.0 (optional) http://www.packetfactory.net/projects/libnet/ You should be able to build and install fiked by just running GNU make install (gmake on BSD) on systems with a C99 capable GCC. Fiked has been developed on FreeBSD, but should build and run fine on other BSD and Linux boxes. Please do send me patches. Reported to work fine are OpenBSD and Debian. By defining WITHOUT_LIBNET, you can omit libnet support, which will remove the dependency on libnet, and will give you a fiked which does not support sending replies with forged source address (-r option). // Credits Fiked is loosely based on vpnc . The code borrowed from vpnc is found in the vpnc subdirectory, see vpnc/NOTICE. // References  http://www.roe.ch/FakeIKEd  http://www.cisco.com/warp/public/707/cisco-sn-20040415-grppass.shtml  http://www.ima.umn.edu/~pliam/xauth/  http://ikecrack.sourceforge.net/  http://www.unix-ag.uni-kl.de/~massar/vpnc/