How to Create a Reverse Shell in Linux?

This is the most powerful feature of netcat for which it is most used by hackers. Netcat is used in almost all reverse shell techniques to catch the reverse connection of shell program from a hacked system.

Reverse telnet

First lets take an example of a simple reverse telnet connection. In ordinate telnet connection the client connects to the server to start a communication channel.

Your system runs (# telnet server port_number)  =============> Server

Now using the above technique you can connect to say port 80 of the server to fetch a webpage. However a hacker is interested in getting a command shell. Its the command prompt of windows or the terminal of linux. The command shell gives ultimate control of the remote system. Now there is no service running on the remote server to which you can connect and get a command shell.

So when a hacker hacks into a system, he needs to get a command shell. Since its not possible directly, the solution is to use a reverse shell. In a reverse shell the server initiates a connection to the hacker’s machine and gives a command shell.

Continue reading

How to create a Simple socket server on Linux or How to Chat in Terminal?

First of all install the required software:

sudo apt-get install netcat-traditional netcat-openbsd nmap

To use netcat-openbsd implementation use “nc” command.
To use netcat-traditional implementation use “nc.traditional” command
To use nmap ncat use the “ncat” command.

To open a simple socket server type in the following command.

$ nc -l -v 1234

Continue reading

Android Slide Up Element Animation Translate

Many would be interested to perform some kind of slide up or bottom up animation of images or elements on a button click.

Translate animation can be used to perform this.

public TranslateAnimation (float fromXDelta, float toXDelta, float fromYDelta, float toYDelta)
FromX - 0
ToX - 0
FromY - 100
ToY - 0

This means from the height of 100px, the animation will move up the view upwards untill toY becomes 0. This looks like the view is moved from bottom up or slide up
Here is the full code to do this:

Continue reading

Resizing ImageView to fit to aspect ratio

There is no built-in scale type that allows the ImageView to automatically upscale the image and keep its aspect ratio intact. The only scale type that does upscaling is fitXY, which won’t respect the aspect ratio. Therefore, a good solution for this is to create a custom imageview class which fits the image and keeps the aspect ratio.  Continue reading

Display Animated GIF in Android

Sandip Kalola's avatarAndroid Partner

I want to display animated GIF images in my application. As I found out the hard way Android doesn’t support animated GIF naively.

Code:

package com.sandipkalola.animatedgif;
import android.os.Bundle;
import android.os.SystemClock;
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Movie;
import android.view.View;
public class MainActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(new AnimatedGif(this));
    }
static class AnimatedGif extends View
    {
        Movie movie;
        AnimatedGif(Context context)
        {
            super(context);
            movie = Movie.decodeStream(context.getResources().openRawResource( R.drawable.ball));
        }
        @Override
        protected void onDraw(Canvas canvas)
        {
            if (movie != null)
            {
                movie.setTime((int) SystemClock.uptimeMillis() %…

View original post 40 more words