Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/330289748

VPN Development Based on IPSec Protocols Suit

Article · January 2016

CITATIONS READS

0 83

2 authors:

Munthir Bahir Khalid kadhim Jabbar


Al-Mustansiriya University Al-Mustansiriya University
3 PUBLICATIONS   0 CITATIONS    9 PUBLICATIONS   2 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Information Security View project

Data Security View project

All content following this page was uploaded by Munthir Bahir on 10 January 2019.

The user has requested enhancement of the downloaded file.


Al-Mustansiriyah Journal of Science
Vol. 27, No 1, 2016

journal homepage:www.mjs-mu.com

VPN Development Based on IPSec Protocols Suit

Munthir B. Tuieb , Khalid K. Jabbar


Computer Science Department, College of Education, Al- Mustansiriyah University

Articleinfo ABSTRACT
Virtual Private Network (VPN) can be used over existing networks, such as the Internet; it
Received 16/12/2014 can facilitate the secure transfer of sensitive data across public networks. This paper
Accepted 18/5/2015 present amethod for VPN development based on IPSec protocols suit. The development
method depends on existing packages this leads to reduce development time, which is the
Keyword:VPN, strongest most important criteriaadopted in the process of development and Component
AES, IPSec, CBSE, Based Software Engineering (CBSE) Since IPSec work at network layer, so there is no
Network Security. need to change the security according to applications. An authentication is provided
through PreShared Key technique.
The proposed method implemented using Java programming language and Linux
operating system. Our proposed method depends on IPSec implementation in Linux kernel
which provides Advanced Encryption Standard(AES) security feature, by focusing on the
performance and design of the implementation. Furthermore, the existing paper focused on
the some IPSec issues and overcomes them.
‫الخالصة‬
‫ ) ممكن أن تستخدم مع شبكات موجودة بالواقع العملي مثل شبكة‬VPN ( ‫الشبكة االفتراضية الخاصة‬
‫ تستخدم الشبكة االفتراضية الخاصة لتسهيل نقل البيانات المهمة أو الضرورية عبر الشبكات العامة بشكل‬.‫االنترنيت‬
‫ طريقة التطوير تعتمد‬.)IPSec( ‫ هذا البحث يقدم طريقة لتطوير شبكة افتراضية خاصة بناءاٌ على بروتوكول‬.‫آمن‬
‫على حزم برمجية موجودة أصال مما يقلل من الوقت الالزم للتطوير والذي يعتبر واحد من اهم المعايير المعتمدة في‬
‫ إذن‬,‫ ) يعمل في الطبقة الثالثة من النظام الشبكي‬IPSec (‫وبما أن بروتوكول‬.(CBSE( ‫التطوير واعادة االستخدام‬
(‫ الموثوقية تقدم باستخدام تقنية المشاركة المسبقة للمفاتيح‬.‫أمنية ا لنظام ال تحتاج للتغيير بموجب التطبيقات التي تعمل‬
‫ البحث يركز على تنفيذ بروتوكول‬.Java ‫ باستخدام لغة‬Linux ‫ الطريقة تنفذ على نظام‬.) PreShared Key
.‫( والتركيز على التصميم واألداء للتنفيذ‬AES) ‫ والذي يزود معيار التشفير القياسي‬Linux ‫) على نظام‬IPSec(
.‫ ) والتغلب عليها‬IPSec ( ‫البحث يقوم بعرض بعض مشاكل تنفيذ بروتوكول‬

1-INTRODUCTION
There are three strategies can be used to achieve privacy original data of the sender, or wasn’t sniffed when
which are private network, hybrid networks and virtual transit[3]. IPSec(abbreviated for IP Security) is used to
private networks. The cost is the major drawback of protect IP datagrams, is often used in VPNs. It provides
private and hybrid networks. An organization uses a method to specify the packet to protect, how that
several leased lines when it connects several sites to packet will be protected, and receiver of that packet.
create private Wide Area Networks(WANs), that means IPSec offers two protocols: Encapsulating Security
a high monthly fee, therefore WANs are expensive. The Payload (ESP) or Authentication Header (AH) ,for both
solution is using the Internet for both private and public IPv4 and IPv6. Internet Key Exchange (IKE) protocol is
networks. Virtual Private Network (VPN) is a used by IPSec to establish and refresh the necessary
technology allows organization using global Internet for cryptographic parameters for AH and ESP protocols[4].
both communications[1].A VPN is used to transmit data T.Tsai identifies how IPSec affects the business strategy
privately and securely over an unsecured and public for Taiwan Internet Server Provider, using X company
network infrastructure[2]. IP packets don’t provide the as an example [5].A. Kundu proposes an extension to
security inherently. As a result, receiving of IP packet Multi-Layer IPSec protocol, on need basis the
isn’t guaranteed from the claimed sender, it contains the intermediate nodes provide access to upper layer header.

91
Al- Mustansiriyah J. Sci., Vol. 27, No 1, 2016

The Implementation of extended Multi-Layer IPSec uses authentication and integrity, which protect against data
Linux kernel of IPSec[6].Adrian Hoban tests the tampering. AH also provides optional anti-replay
potential performance that can be obtained by creating protection, which protects against unauthorized
an AES-NI-GCM implementation using the new retransmission of packets. AH does not protect the data’s
instructions within the Linux kernel cryptographic confidentiality [14] [15]. ESP header is designed to
framework. AES-NI-GCM implemented using provide a mix of security services.
Assembly code. The data presented to demonstrate an ESP can be used to provide confidentiality, data
AES-NI based on IPSec suit on Linux, using modern origin authentication, connectionless integrity, an anti-
Intel microarchitecture running on Intel processors can replay service (a form of partial sequence integrity), and
deliver incredible improvements of IPSec performance (limited) traffic flow confidentiality.ESP adds a header
over previous generations of silicon[7].C.Shue, M. and trailer to packet[16].A Security Association (SA) is
Gupta and S. Myers focus on evaluating of IPSec servers a simplex "connection" that affords security services to
performance in many sitting for client and show that the traffic carried by it. Security services are afforded to
IPSec is not scale as native TCP/IP implementation. A an SA by the use of AH, or ESP, but not both. If both
strong case is made from that analysis for optimizing the AH and ESP protection is applied to a traffic stream,
performance. In their paper, they focus on IKE then two (or more) SAs are created to afford protection
optimization[8]. A. Alsaheel and A. Almogren have to the traffic stream. For two-way IPSec
covered the main aspects of IPSec protocol, including its communications, two SAs are needed, one for each
relationship with other protocols such as Internet Key direction (i.e. inbound and outbound traffic)[17].
Exchange (IKE) and ISAKMP. They have identified
IPSec architecture which includes the main components IPSec Problems
they have introduces its protocols AH and ESP and their There are some problems using IPSec , this paper
differences. They have seen how IPSec implementation introduces a method to overcome these problems. First
can be adopted into the TCP/IP stack in two forms as of all, Operating System (OS) vulnerabilities such as
native or shim. They have dinged into Strong Swan one Domain Name System (DNS) attack. This attack can be
of the best IPSec implementation at Linux systems [9]. utilizes by viruses or malware putting in the Operating
R. Hassan, A. Ahmed, N. Othman and S. Sami System. The virus can alter the IP address of the honest
introduced a new spoofing defense mechanism to peer with the wrong peer when DNS resolved.
eliminate spoofing threat that happens when using IPSec Therefore, wear using Linux OS to overcome this
in transport mode to secure IPv6 over IPv4 tunnel. problem because this OS decrease effective of viruses
A new mechanism work based on IPSec protocol ESP, it for the reason the Linux OS does not support auto-run.
uses the padding area of ESP to write the IPv6 source Also there is no control by any applications on the
address of the packet that will travel across IPv4 system, because the kernel is responsible for the
region[10]. administration. Another issue, Since IPSec suite has
The proposed development introduces some of IPSec many components and many protocols which made the
problems and the solution for them. This paper proposes developing of the system more difficult. In proposed
a method to enhance IPSec authentication through method this issue is overcome by depending on existing
rekeying of Pre Shared Key technique. As well as packages such as Racoon, in order to reduce the
introducing IPSec implementation inside Linux development time and simplified the development
environment. operation.
One of IPSec problems is that designer of IPSec uses
IP Security (IPSec) algorithms to provide security which has already been
IPSec secures Layer three IP communications. cracked. This increases risks of security, especially when
Employ a set of protocols and technologies such as the administrator of network uses those algorithms
Authentication Header (AH), Encapsulating security unknowingly. Instead of more sophisticated, modern
Payload (ESP), Internet Key Exchange (IKE), and others ones which are already available[18]. The proposed
into a complete system that provides confidentiality and method used strong security algorithm (Rijndael
authenticity of IP data[11]. IPSec operates in one of two Algorithm) to develop a system which is depends on
different modes, the transport mode or the tunnel mode, long key and speed of execution. The proposed method
In transport mode, IPSec protects upper layer protocols. is enhancing the authentication of IPSec using Pre
That is, the protection is applied to the payload of the IP Shared Key (PSK) technique depending on dynamic
packet, and the IP header is left intact. Typically this rekeying.
mode is used when end to end security is desired [12].
When IPSec tunnel mode is used, IPSec encrypts the IP Rijndael Algorithm
header and the payload, the complete IP packet is The method depends on an Application Programming
protected and a new IP header is inserted to route from Interface (API) that provided by Linux kernel to fund
one IPSec endpoint to another [13]. Here the entire cryptography services. There are many cryptographic
packet is protected. IPsec uses two protocols to provide services provided by API such as hashes, ciphers,
traffic security Authentication Header (AH) and random number generation and compression. The API
Encapsulating Security Payload (ESP). AH provides provides both asynchronous and synchronous calling

92
Al- Mustansiriyah J. Sci., Vol. 27, No 1, 2016

semantics and is common to applications of kernel mode Add AH and exchange the contents of Next Header field
to use. In this paper the implementation of algorithms and Protocol field of IP header.
uses a plug-in model as framework of cryptographic. To ELSE
implement API the application must call Add zeros as padding to make data even then
crypto_register_alg() function which points to a GOTOStep2.
structure ofcrypto_alg(Rijndael) to be used. The Step3: Set authentication data field empty.
Rijndael structure is defined to be used as cryptographic Step4: Calculate authentication data.
algorithm of the implementation. Rijndael is specified Step5: Put the result in authentication data field
using cra_name member which founds in the structure of (Output).
crypto_alg. Many plug-ins may simultaneously exist and Step6: END.
have the same functionality. The method makes a call to The following algorithm represents Encapsulating
a certain implementation by requesting the name of Security Payload:
implementation. cra_driver_name member is provided
by the structure crypto_alg which is used in our method Algorithm 2: Encapsulating Security Payload
to match the definition of names. When algorithm name Step1: Read data (Input).
is called by multiple implementations at the same time, Step2: Is data length even THEN GOTO Step4
then our method depends on cra_priority member to ELSE
choose the implementation of cryptographic framework GOTO Step3
to be run[7]. Step3: Add zeros as padding
Step4: Add ESP trailer and exchange contents of Next
Pre-Shared Key (PSK) Header field and Protocol field.
PSK is a shared secret which was previously shared Step5: Encrypt Transport layer data
between the two parties using some secure channel with ESP trailer using Rijndael algorithm
before it needs to be used. Step6: Add ESP header.
This algorithm works depending on IP address of peer, Step7: Calculate authentication data.
email address of peer or the domain name. It also .Step8: Put the result of authentication at the end of
requires password which must be the same at two packet(Output)
computers. Authentication hash in aggressive mode of Step9: End.
IKE is sending as response to the client that establishes
IPSec session. This hash may capture using a sniffer, Implementation
such as tcpdump, since this hash isn’t encrypted then it The proposed method implemented as an application
possible start brute force attack or dictionary against this runs by Linux, the application depends on security
hash to recover the PSK. The static password can be services that are found in the kernel of Linux. This will
cracked. So our proposed method is using dynamic omit the transformations between applications and
password. This method depends on generating random operating system, as a result this will enhance the speed
password which is changing with the time. The proposed of execution. Also the wrong settings can affect the
method enhance the authentication of IPSec, even the performance of the application. The application is
password cracked this password will change in later developed using Java, because it is an abstract computer
session. PSK take places before SA negotiated, as a defined by a specification. Java specification omits
result, if PSK isn’t satisfied then SA negotiation will not implementation details that are not part of the Java
begin. So IPSec session will not begin. This method virtual machine's specification. The main reason for this
makes IPSec attack so hard, because even if password omission is to not unnecessarily constrain the creativity
that acts as gate to IPSec session cracked, the cracker of implementers. Figure 1 shows testing for
can’t use the cracked password in next session. implementation of the application using Kame tool.
IKECrack is a tool available to do this job. The proposed
method proves its immunity to crack using this tool.

Mode Algorithms
These algorithms are mainly used to specify the mode
which defines the way to provide the security by IPSec
protocols (AH and/or ESP). Racoon tool is used for
development which save development time.
Using this tool to provide the development to IPSec
protocols which are Authentication Header (AH) and
Encapsulating Security Payload (ESP), the next Figure 1: Checking application work using Kame tool
algorithm represent authentication header.
Results
Algorithm 1: Authentication Header The central processing unit (CPU) is typically
Step1: Read data (Input) the hardware component most affected by IPSec. The
Step2: Is data length even THEN main drawback of IPSec is the CPU overhead, because

93
Al- Mustansiriyah J. Sci., Vol. 27, No 1, 2016

IPSec provides its security to required packets as well as 3. S. Kent and R. Atkinson, “Security architecture for
to unwanted ones. The paper made IPSec application- the internet protocol,”
dependent when it operates on fourth layer using RFC 2401 (Proposed Standard), Internet Engineering
Transport Mode to overcome processing unwanted ones. Task Force, updated by RFC 3168Nov.1998.
IPSec implementation typically provides protection for
all traffic. In some cases, this may not be advisable 4.D. Harkins and D. Carrel, “The Internet Key Exchange
because of performance reasons. The number of packets (IKE),” RFC2409 (Proposed Standard), Internet
are reduced in the system, this leads to reduce IPSec Engineering Task Force, Nov. 1998.
processing, packet processing and the overload.
Encrypting traffic that does not need protection or is 5. T. Tsai, “How IP VPN Affects Strategy for Company
already protected (e.g., encrypted by another application) X” Master Thesis, Taiwan University, 2002.
can be a significant waste of resources. Two modes are
used in this paper, with each connection type there is 6. A. Kundu, “An Extension of Multi-Layer IPSec for
appropriate mode. This can affect the security of the Supporting Dynamic QoS and Security Requirement“,
system such as using Transport mode for connection Master Thesis, Indian Institute of Science, Bangalore,
between computers in different networks is less secure 2010.
than Tunnel mode. At remote network the IP layer may
has vulnerability could be passed across IPSec tunnel 7. A. Hoban “Using Intel® AES New Instructions and
into the corporate network. it is doable to guarantee that PCLMULQDQ to Significantly Improve IPSec
this isn’t happening, but higher support results is Performance on Linux”, Software Engineer Intel
expensive. By using Transport Mode the drives of Corporation paper, 2010.
network don't appear to remote workers, the network is
shielding against threats such as worms. The method 8. C.Shue, M. Gupta and S. Myers “IPSec: Performance
enhances the security of IPSec protocol suite by using Analysis and Enhancements”Computer Science
additional authentication technique. Pre-Shared Key is Department, Department of Informatics Indiana
authentication technique that uses in the paper which University paper, 2007.
depends on rekeying to reduce attack happening. The
security comes from many resources, first of all , 9. A.Alsaheel and A.Almogren” A Powerful IPSec
Operating System (Linux) that prevents auto-run and Multi-Tunnels Architecture”,Journal of Advances in
another application controlling and security package Computer Network Saudi Arabia s, Vol. 2, No. 4,
provision. Wrapping algorithm (Rijndael) isn’t cracked December 2014.
anymore. The original protocol suit provides strong
security as well as enhancing authentication using 10. R. Hassan, A. Ahmed, N. Othman and S. Sami
rekeying of Pre-Shared Key. The above factors make “Enhance Encapsulated Security Payload A New
application provides strong security which overcomes Mechanism To Secure Internet Protocol Version 6 Over
some attack such as DNS attack , sniffer and brute force Internet Protocol Version 4”, UniversitiKebangsaan
attack. Tcpdump and Kame tools are used to test robust Malaysia, 2014.
of application security.
11. W.Robert ,"Next-Generation Network Services",
Conclusions Cisco Press, 2005.
The proposed method provides additional level of
authentication to that is provided by IPSec protocol, this 12. M. Bani-Hani, “Enhancing The IKE Pre Shared Key
leads to enhance the security. The proposed method AuthenticationMethod”, University of Missouri-
depends on kernel of operating system to provide the Columbia, Dissertation, 2006.
security; this reduces time of execution, because it
eliminates the time taken for transformation between 13. T.Florian," Security Analysis, Prototype
operating system and application. The method prevents a Implementation and Performance Evaluation of a New
normal user from work unless having (Root) permission, IPSec Session Resumption Method", Master Thesis,
this will provide optimal security. The viruses that can Georg-August-University, 2008.
exploit system vulnerability are less affective, since the
system is developed with Linux operating system. 14. Paper of The Government of the Hong Kong Special
Administrative Region(HKSAR),”VPN Security”,
References February 2008.

1.B.Forouzan ,"Data Communications and Networking", 15. S. Clara, “Virtual Private Networking Basics”
4th Edition, McGraw-Hill, 2007. ,NETGEAR, Inc., October 2005.

2. J. Carmouche,"IPsec Virtual Private Network 16. R. Atkinson and S. Kent. “IP Encapsulating Security
Fundamentals ", Cisco Press, 2006. Payload (ESP)”, IETF, RFC 2406, 1999.

94
Al- Mustansiriyah J. Sci., Vol. 27, No 1, 2016

17. S.Friedl. “An Illustrated Guide to


IPsec.”SteveFriedl's Unixwiz.net Tech Tips, [Online]
August 24, 2005. [Cited: October 18, 2007.]
18. Y. Raiwani, "IPSec Protocol in VPN", International
Journal of Engineering Research & Technology
(IJERT),Vol. 3 Issue 1, January - 2014

95

View publication stats

You might also like