INTRO

I found that Termux is really famous android application. I don’t use it myself if I say honestly. but I have seen some other people using it. there is no need to install Termux if you have a PC with Kali Linux installed. I think Termux is a great tool that allows you to learn many hacking techniques. I saw that we can even install the Metasploit in Termux. And we know that Metasploit is a very powerful tool. you can use it to get a shell, open any server, in post-exploitation. We had a video on the “setup of Metasploit”. But it was removed by the You-Tube. I think I can make a tutorial on this topic if  I get comments.

If you don’t know about Termux, you should take a look at This Page before reading this article further more.

SSH is not a shell utility. I mean it is a shell utility but it can be used in some work too. for example, with the SSH port forwarding, you can easily host your website on a remote system. You can chat with some other users connected to the same ssh connection. you can peek into some other user shell. I mean that you can use it to capture the keys which are being typed by some other user on SSH. and one of the best use of ssh is, you can use x11 forwarding to use the GUI applications. I have told you about this method before, CLICK HERE.

And I promise that I will cover all the other topics very soon that I have mentioned above.

INSTALLATION

You can easily install this via Play Store or F-dorid.

• To install Termux with Play Store: DOWNLOAD

• To install Termux with F-dorid: DOWNLOAD

 

SETUP

Now that you have Termux installed we can Install SSH in it and use it. we first need to update our repository. type this command:

pkg update

OR

apt update

Screenshot:

 

Now, we will install the SSH. Type this command:

pkg install ssh

OR

apt install ssh

SSH installation can take some time. it’s all depends on your internet speed.

A few days back, I created a Python script using Pexpect lib. I have already told you about Pexpect lib in my previous articles, CLICK HERE.

Basically, I used AWS cloud services to launch a Linux instance. then, I installed Docker in it. and I created a Kali container. so, my progress may not lose. and I installed all tools of Kali Linux(Metapackages). now, you can see that it is a long process. I mean not long but I guess it is for me. so I created a python script to automate all this process.

Script

Let’s take a look at the script. ¶ GitHub

In the first lines, I have used some modules. and I know that I haven’t used all of those. but I am gonna make it more useful. it is in the developing stage.

Inline 15, there is an ssh command merged with Pexpect.

Screenshot:

In the next lines, I have used a function to tell the shell the size of the terminal window. even if you change the size continuously after getting shell, you will always get the correct size.

Now we have a function here to start the container which we have set up before.

Screenshot:

Now let’s run it in our Linux first. I have named this file “mylove” and moved it in /bin. so whenever I type mylove in terminal, it will execute the script.

Screenshot:

Now, let’s run it in our Andriod Termux. I don’t know why but shebang wasn’t working there. so, I had to use python command to run it.

Screenshot:

 

and that’s it. Now we can use a powerful Kali Linux in our Andriod without downloading any ISO file. in my upcoming articles, I will try to use my local Kali Linux on my android with the graphical user interface.

 

 

Thanks For Visiting.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here