Sie sind auf Seite 1von 5

International Journal of Advanced Engineering Research and Technology (IJAERT)

131

Volume 3 Issue 1, January 2015, ISSN No.: 2348 8190

Securing Mobile Agent Based Web Crawlers


From Virtual Memory Attack
Manisha Singh Raghav
Dept. Computer Science
Galgotias College Of Engineeri
AndTechnology
Greater Noida,India

Dev Gupta
Dept. of Computer Science
Galgotias College Of Engineering
And Technology
Greater Noida,India

AbstractWeb crawling is the process of discovery


and maintenanace of large scale data over the web.
Crawlers achieve this process by following the web
pages hyperlink to automatically download the relevant
links from all over the web. The World Web contains a
large no. of text,images,documents,multimedia and
other information. This information gets refreshed
everyday. Mobile agent technology offers a new
computing paradigm in which a program is in the form
of a software agent that can suspend its execution on a
host computer, transfer itself to another agent enabled
host on the network, and resume execution on the new
host and thus maintaining the freshness of repository.
The proposed approach uses java aglets for crawling the
web pages and also describe the aglets framework
which remains highly vulnerable to Denial of
Service(DOS) attacks despite multilayered security
provided by exixting frameworks caused due to virtual
memory attack. . A denial of service (DoS) attack is an
attempt to prevent legitimate users from using a service.
This is usually done by consuming all of a resource
used to provide the service In this paper we have
described the detection of attack on aglet platform
caused due to creation of threads. The algorithm
proposed in this paper is capable of detecting as well as
reducing the DoS attack.The overhead introduced on
aglet platform by the proposed solution is negligible as
compared to the security it offers .
Keywords- web crawling, mobile agents, aglets, DoS,
virtual memory attack
I.
INTRODUCTION
A mobile agent or a free roaming mobile agent is a
software program which can migrate from host to host
to collect the information on behalf of its owner.
Migration from host to host will cause the vulnerability
for the agent environment. Vulnerabilities may be to
agent or agent platforms .Various protection models
were provided to protect the vulnerabilities of the agent
and the platforms. The security is an important issue in
the mobile agent framework, since such technology
potentially provides an easy method to propagate

Ayushi Chaudhary
Dept. Computer Science
Galgotias College Of Engineering
And Technology
GreaterNoida,India

malicious code.The aglet framework remains highly


vulnerable to Denial of Service (DoS) attacks despite
multilayered
security
provided
by
existing
frameworks.[4]
The first The first layer of security is provided by the
Java Virtual Machine. The second layer of security is
provided by the security manager of aglet platform and
the final layer is Javas new Security API. Attacks
against availability mainly attempt to overload the
resources or make a particular facility unavailable at a
certain time, thus making them unavailable to genuine
entities. Attacks in this category are usually referred as
Denial of Service (DoS) attacks. The DoS attack is the
most popular attack in the network security with the
development of network and internet[1]. Conversely,
aglet themselves may carry sensitive information, and
so aglet must be protected from their host environments.
Malicious agents are those that try to attack the hosting
agent platform. Malicious agents are further classified
according to the type of resource on the platform they
attack. Consuming resources of the hosting platform in
an improper way is one common trait of malicious
agents. Examples of such resources are all
computational resources such as memory, CPU cycles,
or network bandwidth. These resources are consumed in
a way that the mobile agent platform eventually is not
able to provide its usual service to other agents. Such
attacks are therefore called Denial-of-Service attacks.
On a DoS attack, the performance of a web server
hosted in a VM can degrade by up to 23%, while that of
a nonvirtualized server hosted on the same hardware
degrades by only 8%.[2]

II.

LITERATURE SURVEY

A. Mobile Agent System


Mobile Agent System consists of two main
components: mobile agents and mobile agent platforms
(Aglet platform i.e. Tahiti server) . Mobile agents are
software which is goal-directed and can automatically
suspend their execution on one platform and migrate to
another platform, where they resume execution to
accomplish their tasks. Mobile agent platforms are
execution environments for mobile agents on different

www.ijaert.org

International Journal of Advanced Engineering Research and Technology (IJAERT)

132

Volume 3 Issue 1, January 2015, ISSN No.: 2348 8190

computers, including the home platform and guest


platforms. A home platform of a mobile agent is
responsible for creating, initializing, dispatching,
receiving, and eliminating a mobile agent. The home
platform
environment
is
the
most
secure
environment[5].

Attacks in this category are usually referred as Denial of


Service (DoS) attacks.

B. Security

Security is a fundamental concern for a mobile agent


system. Harrison et al. identify security as a severe
concern and regard it as the primary obstacle to
adopting mobile agent system.
The operation of a mobile agent system will
normally be subject to various agreements wheather
declared or tacit. These agreements may be violated ,
accidently or internally , by the parties they are
intended to serve. A mobile agent system can also be
threatened by parties outside of the agreements they
may create rogue agents .They may hijack existing
agents or the may commander interpreters. A rogue
agent may carry malicious code that is designed to
disrupt the services offered by the agent platform,
degrade the performance of the platform, or extract
information for which it has no authorization to access.
Depending on the level of access, the agent may be able
to completely shut down or terminate the agent platform
[11].
In this paper we are using aglets platform in order to
support the development of mobile agents. The
execution environment within which Aglets are
executed is referred to as the Aglets Context and is
responsible for enforcing the security restrictions of the
mobile agent .
The different states in Aglet life cycle are as
follows:[3]
Activated: Aglet is loaded from storage and allowed to
resume execution.
Deactivated: Aglets execution is halted and its state is
saved.
Cloned: Aglet is copied for concurrent execution.
Disposed: Execution of the aglet ceases permanently
Created: Aglet is initialized for execution
Dispatched: Aglet is sent to another execution context.
Retracted: Aglet is obtained from another execution
context.
The aglet framework remains highly vulnerable to
Denial of Service (DoS) attacks despite multilayered
security provided by existing frameworks[12]. The first
layer of security is provided by the Java Virtual
Machine. The second layer of security is provided by
the security manager of aglet platform and the final
layer is Javas new Security API. Attacks against
availability mainly attempt to overload the resources or
make a particular facility unavailable at a certain time,
thus making them unavailable to genuine entities.

Figure 1: Aglet Life-cycle

III.

JVM MEMORY ALLOCATION

Heap (Boyland, 2005) is the runtime data area from


which memory for all class instances and arrays are
allocated. It is created at the JVM start-up. Heap
memory for objects is reclaimed by an automatic
memory management system which is known as a
garbage collector. Heap size is controlled with -Xms/Xmx startup parameters.
If more heap is required than the available memory by
the automatic storage management system for
computation
then
the
JVM
throws
an
OutOfMemoryError.
Non-Heap Memory (Boyland, 2005) The Java virtual
machine manages memory other than the heap which is
referred as non-heap memory.
The JVM has a method area which is shared among all
threads. The method area belongs to non-heap memory.
It stores per-class structures such as a runtime constant
pool, field and method data, and the code for methods
and constructors. It is created at the JVM start-up. The
method area is logically part of the heap but a JVM
implementation may choose not to either garbage
collector compact it. In addition to the method area, a
JVM implementation may require memory for internal
processing or optimization which also belongs to nonheap memory. [4]

IV.

DENIAL OF SERVICE ATTACKS

A denial of service (DoS) attack is an attempt to prevent


legitimate users from using a service. This is usually
done by consuming all of a resource used to provide the
service[5] . The resource targeted is typically one of the
following:

CPU

Operating memory (RAM)

Bandwidth

Disk space
Sometimes, a less obvious resource is targeted. Many
applications have fixed length internal structures and if

www.ijaert.org

International Journal of Advanced Engineering Research and Technology (IJAERT)

133

Volume 3 Issue 1, January 2015, ISSN No.: 2348 8190

an attacker can find a way to populate all of them


i.
quickly, the application can become unresponsive.
DoS attacks can be broadly divided into five categories:
[6]
ii.

Network attacks

Self-inflicted attacks

Traffic spikes

Attacks on Apache (or other services in


generale.g., FTP)

Local attacks

Figure 2: Denial of Service Attack


this kind of attack occurs when an agent comes to a host
to produce some results by utilizing the resources of the
host. Now a malicious host can ignore the agent request,
may introduce delays or it may not allow the agent to
execute at all. This kind of attack may give rise to
deadlock condition or unnecessary long delays when
multiple agents are dependent on each others result
[12].

V.

ATTACK
MEMORY

ON

VIRTUAL

Each JVM thread has a private JVM stack, created at


the same time when the thread is created. A JVM stack
stores frames. It holds local variables and partial results,
and plays a part in method invocation and return.
Because the JVM stack is never manipulated directly
except to push and pop frames, frames may be heap
allocated.
The JVM specification permits JVM stacks either to be
of a fixed size or to dynamically expand and contract as
required by the computations. If the JVM stacks are of a
fixed size, the size of each JVM stack may be chosen
independently when that stack is created. A JVM
implementation may provide the programmer or the
user, control over the initial size of JVM stacks. It also
provides, in the case of dynamically expanding or
contracting JVM stacks, control over the maximum and
minimum sizes. From the experiment that we carried
out, it was learnt that 3300 threads could be created per
second.
The following exceptions are associated with JVM
stacks:
If the computation in a thread requires a larger JVM
stack than is permitted, the JVM throws a
StackOverflowError exception.
The JVM throws an OutOfMemoryError exception
under two conditions:

JVM stacks can be dynamically expanded, and


expansion is attempted while the available memory is
insufficient.
While initiating a new thread the memory available for
the JVM stack is insufficient. In the current scenario
agent can create any number of threads, so there is
possibility of java.lang.OutOfMemoryError: [10]
unable to create new native thread exception. This
means java process has run out of virtual memory as a
process is trying to create a new thread.
This is resource vulnerability in Aglet platform. One
agent can create any number of threads which could
result Java virtual machine (JVM) throwing
java.lang.OutOfMemoryError: unable to create new
native thread error, and JVM stops creating new
threads. Due to non-availability of free memory, Aglet
platform is unable to handle new requests for agent
creation or reception. This is a kind of denial of service
attack. If those threads contain an infinite loop or some
CPU intensive code then JVM throws Fatal Error
message and Aglet platform execution is aborted.
CrashThread Agent.
public class CrashThread extends Aglet
{
crashThread thread = null;
public void run()
{ for ( int i =0; i < 10000; i++)
{
thread = new crashThread();
}
}}
crashThread Thread
class crashThread extends Thread
{
public void run()
{ Thread.sleep(Interger.max);
} }

crashThread Thread (with infinite loop)


class crashThread extends Thread
{
public void run()
{ while (true);
}
}
Thread Monitor Algorithm
Step 1: Set thread limit per agent as threshold value.
Step 2: Check whether Active Thread count of any
agent crosses the threshold value. Then dispose the
agent.
Step 3: go to step 2.

www.ijaert.org

International Journal of Advanced Engineering Research and Technology (IJAERT)

134

Volume 3 Issue 1, January 2015, ISSN No.: 2348 8190

platform. This happens due to the fact that while


disposing off the agent, the threads are created by that
agent needs to be stopped first. Mitigation time varies
because the response time for the threads to be stopped
is not constant.

Time (sec) Vs CPU Usage (%)

Flow Chart - Mitigation of Attack on Virtual


Memory
For our experimental purpose, we started
ThreadMonitor thread in the Tahiti server (Aglet
Platform). This thread checks the number of agent
threads currently active. We set the thread limit to 100
threads per agent and the sleep time as 100ms. This will
not have considerable affect on CPU utilization. Next
section compares performance of platform with and
without ThreadMonitor module.

VI.

PERFORMANCE EVALUATION

The agent used for attack is CrashThread, which


creates very large number of native threads at the rate of
3300 threads per second.
Our mitigation technique adds a thread to aglet platform
which counts the number of threads running. The graph
in Figure depicts variation of CPU utilization with
respect to time for both the scenarios i.e. before adding
the mitigation thread and after adding the mitigation
thread.
Case A: shows CPU utilization before adding the
mitigation thread.
Case B: shows CPU utilization after adding the
mitigation thread.
The graph shows negligible increase in CPU
utilization after adding mitigation thread. Hence our
mitigation strategy puts only negligible load on the aglet
platform.
The graph in Figure plots variation in mitigation time
with respect to number of genuine agents. Variation in
mitigation time depends heavily on the internal
processing of the thread created by the agent and to
some extent on the number of agents in the aglet

Number of genuine Agents Vs Mitigation Algorithm


Processing Time (ms)

VII.

FUTURE SCOPE

The scope of the project is to identify various


mechanisms to materialize DoS attacks on Aglet
platform. Also, mitigation schemes need to be devised
and integrated within Aglet platform to thwart identified
attacks.

VIII.

CONCLUSION

We have proposed a solution to overcome the Denial of


Service attack caused by exhaustion of virtual memory
on aglet platform. The proposed solution introduces
negligible overload on the existing aglet platform and
successfully resolves the Denial of Service attacks
caused by Thread Creation. The results show that the
proposed mitigation schemes are effective as they are
capable of detecting as well as mitigating DoS attacks
which results in reduced CPU and memory utilization.

www.ijaert.org

International Journal of Advanced Engineering Research and Technology (IJAERT)

135

Volume 3 Issue 1, January 2015, ISSN No.: 2348 8190

Our mitigation techniques work by disposing off the


malicious agents and hence preventing the platform
from becoming available to genuine agents. This way it
ensures high availability of the platform.

10.

11.

REFERENCES
1. Intelligent
Information
Technology
Application, 2009. IITA 2009 ,Third
International Symposium on (Volume:1 ) in
IEEE system journel- Research on dos attack
and
detection
programming
Wentao
Liu ; Dept. of Comput. & Inf. Eng., Wuhan
Polytech. Univ., Wuhan, China.
2. IEEE SYSTEMS JOURNAL, VOL. 7, NO. 2,
JUNE 2013 335 Performance of Virtual
Machines Under Networked Denial of Service
Attacks: Experiments and Analysis Ryan Shea,
Student Member, IEEE, and Jiangchuan Liu,
Senior Member, IEEE.
3. Md. Abu Kausar and V. S. Dhaka ,Dept. of
Computer & System Sciences, Jaipur National
University, Jaipur, and Sanjeev Kumar Singh
,Dept. of Mathematics, Galgotias University,
Gr. Noida, India , Web Crawler Based on
Mobile
Agent and Java
Aglets ,I.J.
Information Technology and Computer
Science, 2013, 10, 85-91 Published Online
September 2013 in MECS (http://www.mecspress.org/) DOI: 10.5815/ijitcs.2013.10.09)
4. Ichiro Satoh Mobile Agents .2010
International Journal of Computer Applications
(0975 - 8887) Volume 1 No. 15 5 Security
on
Mobile
Agent
Based
Crawler
(SMABC):Nisha Pahal ,Y.M.C.A. Institute of
Engineering, Faridabad ,Sunil Kumar Lingayas
University, Faridabad and Ashu Bhardwaj
Y.M.C.A. Institute of Engineering, Faridabad
5. http://stackoverflow.com/questions/8000577/act
ual-memory-allocation-by-jvm-and-how-dothey-differ
6. Understanding the Impact of Denial of
Service Attacks on Virtual Machines Ryan
Shea
,Simon Fraser University ,Burnaby,
Canada and Jiangchuan Liu ,Simon Fraser
University ,Burnaby, Canada.
7. Denial of Service Attacks by Qijun Gu, PhD.
Assistant Professor Department of Computer
Science Texas State University and San Marcos
, TX, 78666 Peng Liu, PhD. Associate
Professor School of Information Sciences and
Technology Pennsylvania State University.
8. R. Nicole, Title of paper with only first word
capitalized, J. Name Stand. Abbrev., in press.
9. Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa,
Electron spectroscopy studies on magneto-

www.ijaert.org

12.

13.

14.
15.
16.
17.

18.

19.

20.

21.
22.

optical media and plastic substrate interface,


IEEE
Transl. J. Magn. Japan, vol. 2, pp. 740-741,
August 1987 [Digests 9th Annual Conf.
Magnetics Japan, p. 301, 1982].
Aglets: Programming Mobile Agents in Java
DannyB.Lange1, Mitsuru Oshima1, Gu nter
Karjoth2, and Kazuya Kosaka Tokyo Research
Laboratory ,IBM Japan Ltd.,Zurich Research
Laboratory, IBMSwissLtd.
I.J. Information Technology and Computer
Science, 2013, 10, 85-91Published Online
September 2013 in MECS (http://www.mecspress.org/) MECS I.J. Information Technology
and Computer Science, 2013, 10, 85-91
Web Crawler Based on Mobile Agent and Java
Aglets ,Md. Abu Kausar ,Dept. of Computer
& System Sciences, Jaipur National University,
Jaipur, India , V. S. Dhaka ,Dept. of Computer
& System Sciences, Jaipur National University,
Jaipur, India Sanjeev Kumar Singh ,Dept. of
Mathematics, Galgotias University, Gr. Noida,
India
M. Young, The Technical Writers Handbook.
Mill Valley, CA: University Science, 1989.
http://www.oracle.com/technetwork/java/javase
/memorymanagement-whitepaper-150215.pdf.
http://www.albany.edu/acc/courses/ia/acc661/sp
800-19.pdf
http://mtech.iiita.ac.in/A%20grade/Prabhat%20
Singh%20S.%20MS200515%20%20Security%20of%20Mobile%20agents.pd
Wayne Jansen and Tom Karygiannis, (2000).
NIST Special Publication 800-19 Mobile
Agent Security, National Institute of Standards
and Technology Computer
Naghavi M. and Sharifi M., (2012) A
Proposed Architecture For Continuous Web
Monitoring Through Online Crawling Of
Blogs, International Journal of UbiComp (IJU),
Vol. 3, No. 1
S.Venkatesan and C.Chellappan, (2008).
Protection of Mobile Agent Platform through
Attack Identification Scanner (AIS) by
Malicious Identification Police (MIP), First
International Conference on Emerging Trends
in Engineering and Technology, 2008.
Aglet Development group, (2009). The Aglet2.0.2 Users Manual.
Naghavi M. and Sharifi M., (2012) A
Proposed Architecture
For Continuous Web
Monitoring Through Online Crawling Of
Blogs, International Journal of UbiComp (IJU),
Vol. 3, No. 1.

Das könnte Ihnen auch gefallen