Android Hacking in Kali Linux Using Metasploit Fra
Android Hacking in Kali Linux Using Metasploit Fra
ABSTRACT
Article Info IT Security is a major concern of the internet as almost all communication takes
Volume 7, Issue 3 place over the internet today. The purpose of penetration testing is to ensure
Page Number: 497-504 that the system and network do not have a security breach that could allow
unauthorized access to the system and network. A possible and appropriate way
Publication Issue : to prevent system and network hacking is penetration testing. The document
May-June-2021 outlines some basic concepts of penetration testing, evaluating existing tools and
exploits, and using the Metasploit framework for penetration testing and
Article History running exploits within the framework and tools.
Accepted : 01 June 2021 Keywords: Penetration Testing, Payload, Exploit, Meterpreter, Metasploit
Published : 07 June 2021 Framework.
Copyright: © the author(s), publisher and licensee Technoscience Academy. This is an open-access article distributed under the 497
terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use,
distribution, and reproduction in any medium, provided the original work is properly cited
Abhishek Arote et al Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol, May-June - 2021, 7 (3) : 497-504
script[3].”Using Kali Linux Security Tools to Create hackers (both black hat and white hat) utilize it to
Laboratory Projects for Cyber security Education” gather all the information about the victim or target.
describe the installation and lists of tools provided by UPDATE AND INITIATION: Update Kali Linux and
Kali Linux 2017.3 and uses preconfigured and Initiate apache2 service to host the android
preinstalled tools for laboratory project using application on web server so victim can access it. The
VMware (virtual machine framework)[6].“Offensive state of apache may be active or inactive.
Security : Ethical Hacking Methodology on the Web” CREATING PAYLOAD AND EXPLOITATION: The
The objective is to plan methodology, generate main goal of a pen tester is to crack all kinds of
policies for security assurance and ISO 2007 attacks, security and have remote access to the server, for this
risk analysis using MSAT 4.0 tool based on ISO we use Metasploit Framework. Moreover, we create a
standard[9]. file using payload and exploit to append a virus with
the application or file.
1.1 WHAT IS PENETRATION TESTING? REPORT GENERATION: At this stage, we only
create a full report on our penetration testing process.
Penetration testing also known as ethical hacking, are
operations of a computer system, network or web III. EXPLOITATION OF VULNERABILITIES
application to find loop holes that an attacker could
exploit. Penetration testing can be appended with The exploitation phase of the penetration test is
files/application or it is performed by individuals. On performed using web server and some tools which
the target before testing, identifying potential entry are already built into the Kali Linux OS. These tools
points, attempting to get in either virtual or real, and are free and open source tools which are made
reporting results. It is the procedure of assessing the availaible by the developers of Kali Linux
security of an organization by exploiting i.e .Offensive security.
vulnerabilities in such a way that attackers can
A. Apache2 Server
exploit them, thereby preventing and documenting
The Apache HTTP Server is a free, open source web
the attack process.
server that delivers our content via the web service
over the Internet. It fully supports all operating
1.2 WHY PERFORM A PENETRATION TEST?
systems such as UNIX, Windows, Linux etc. and is
now becoming the most popular HTTP client.
If an unauthorized person used the vulnerability to
access corporate resources, corporate resources could B. Metasploit Framework
be compromised. The goal of a penetration testing is Metasploit Framework is an open source penetration
to fix vulnerabilities before they can be used. testing and development platform that provides
exploits for a wide variety of applications, operating
II. STAGES IN PENETRATION TESTING systems, and platforms. Metasploit is one of the most
widely used penetration testing tools and is built into
INFORMATION GATHERING: Information Kali Linux.
gathering means gathering different types of
information about the target. It is the first stage of
ethical hacking where penetration testers or ethical
IV. GENERATING RESULTS OF TEST and execute. Finally, check the internet protocol
address of attacking system.
The test results should contain solutions to reduce or
eliminate the weak points. This is what distinguishes Command to login into root user :-
a penetration test from a security audit. Identified $ sudo su (to login from normal user to super user to
significant vulnerabilities must be addressed first and get all permissions i.e. read ,write and execute)
a specific schedule must be established to verify that
the vulnerabilities have been addressed. The Command to check the ip address:-
department, network or system can be selected for $ ifconfig (to verify the internet protocol address of
the same penetration testing process. host machine)
The solutions implemented depend on the
vulnerabilities identified, the loss to the company if ATTACKERS IP :- 192.168.0.196 (INTERNET
the conditions that triggered the vulnerability occur, PROTOCOL ADDRESS OF KALI OS)
and the cost (and effectiveness) of the solutions
available. One solution might require a new system
A. SWITCHING TO ROOT USER :-
running a web server to pass a vulnerability test
before opening the web port in the firewall. Another To switch from Normal or Ordinary User to Super
solution might require that all email within the user or root user. Root is the real name of the
domain be sent to a central mail system and sent to administrator account. "sudo" is a command that
the local host. Systems through the central mail enables ordinary users to perform administrative
server. Enforcement of existing policies may be the tasks. The root user has user ID 0 and nominally
only condition to address certain vulnerabilities. unlimited privileges. Root can access any file, run any
In the case of desktop security, remote management program, make any system call, and change any
software may already be banned in the company, but configuration.
better work needs to be done to ensure compliance.
There will be vulnerabilities that can be fixed by
applying the latest version of the application or the
operating system patch. The results of the report
should be closely monitored. If the information falls
into the wrong hands, an unauthorized person could
exploit the current one.
V. TEST PERFORMED
IP address is a unique identification of a devthe Apache HTTP Server, commonly known as Apache,
Internet or on a LAN. IP stands for "Internet is a free, open source, cross-platform Web server
Protocol", these are the rules that regulate the format software released under the Apache 2 license. Apache
of data that is sent over the Internet or a LAN.Four is developed and maintained by an open developer
types of IP addresses are: public, private, static, and community under the protection of Apache Software
dynamic. Public and private indicate the position in Foundation.
the network, private is used in the network, public is
outside the network, and static and dynamic are used Commands To Start Apache2 Server :
permanently.
# service apache2 status (to verify whether the
Number of bits on IP Address are : 32 service is active or inactive)
# msfvenom -p android/meterpreter/reverse_tcp
LHOST=attacker’s IP LPORT=4444
R > /var/www/html/malicious.apk
G. EXPLOITATION
While exploitation, We need to use
exploit/multi/handler to handle the msf process.
Then we have to set the PAYLOAD which is
android/meterpreter/reverse_tcp as we have to gain
access of android and reverse tcp because the tcp port
is open on internet. Just set the LHOST and LPORT
just to exploit the apk on the host machine . Lastly,
Fig 1.5 : Activating Apache2 Server & Creating Exploit payload.
Payload
COMMANDS TO EXPLOIT :-
box, white box and gray box tests, depending on the [7]. M. C. Tran and Y. Nakamura, “Classification of
amount of information available to the user. Testers HTTP automated software communication
can also choose between internal and external tests, behaviour using NoSql database,” in 2016
depending on the Specific Objectives. There are three International Conference on Electronics,
types of penetration testing: network, application, Information, and Communications (ICEIC),
and social engineering. This document gives the brief Danang, Vietnam, pp. 1–4, 2016.
idea about Android Hacking and step by step process [8]. A. Chowdhury, “Recent Cyber Security Attacks
to gain access of an Android Device. and
[9]. Their Mitigation Approaches – An Overview,”
in Applications and Techniques in Information
VIII. REFERENCES Security,vol. 651, L. Batten and G. Li, Eds.
Singapore: Springer Singapore, pp. 54–65, 2016.
[1]. O. Aslan and R. Samet, "Mitigating Cyber [10]. F. Cuzme-Rodríguez, M. León-Gudiño, L.
Security Attacks by Being Aware of SuárezZambrano, and M. Domínguez-Limaico,
Vulnerabilities and Bugs," 2017 International “Offensive Security: Ethical Hacking
Conference on Cyberworlds (CW), Chester, Methodology on the Web,” in Information and
pp.222-225, 2017. Communication Technologies of Ecuador
[2]. Internet Crime Complaint Centre link: (TIC.EC), vol. 884, M. Botto-Tobar, L.
www.ic3.gov BarbaMaggi, J. González-Huerta, P. Villacrés-
[3]. H. Gupta and R. Kumar, “Protection against Cevallos, O. S. Gómez, and M. I. Uvidia-
penetration attacks using Metasploit,” in 2015 Fassler, Eds. Cham: Springer International
4th International Conference on Reliability, Publishing, pp. 127–140, 2019.
Infocom Technologies and Optimization [11]. F. Holik, J. Horalek, O. Marik, S. Neradova and
(ICRITO) (Trends and Future Directions), S. Zitta,"Effective penetration testing with
Noida, India, pp. 1–4, 2015. Metasploit framework and methodologies,"
[4]. Muniz, J. & Lakhani, A. (2013). Web 2014 IEEE 15th International Symposium on
Penetration Testing with Kali Linux a practical Computational Intelligence and Informatics
guide to implementing penetration testing (CINTI), Budapest, pp. 237-242, 2014.
strategies on websites, web applications, and [12]. M. Denis, C. Zena and T. Hayajneh,
standard web protocols with Kali Linux. "Penetration testing: Concepts, attack methods,
Birmingham: Packt Publishing. and defense strategies," 2016 IEEE Long Island
[5]. Singh, A. (2012). Metasploit penetration testing Systems, Applications and Technology
cookbook over 70 recipes to master the most Conference (LISAT), Farmingdale, NY,pp. 1-6,
widely used penetration testing framework. 2016.
Birmingham: Packt Pub. [13]. S. Nagpure and S. Kurkure, “Vulnerability
[6]. A. Ghafarian, “Using Kali Linux Security Tools Assessment and Penetration Testing of Web
to Create Laboratory Projects for Cybersecurity Application,” in 2017 International Conference
Education,” in Proceedings of the Future on Computing, Communication, Control and
Technologies Conference (FTC) 2018, vol. 881, Automation (ICCUBEA), PUNE, India, pp. 1–6,
Cham: Springer International Publishing, pp. 2017.
358–367, 2019.