قالب وردپرس درنا توس
Home / Tips and Tricks / How to chase a computer with SSH «Null Byte :: WonderHowTo

How to chase a computer with SSH «Null Byte :: WonderHowTo



Although SSH is mostly used for covert access through the back door to a computer, it is sometimes useful to do the exact opposite. If you have ever had to prove that you have remote access to a device, or just want a way to convince someone that their computer has been haunted, SSH can be used to make a device show signs of possession.

Spooky remote action

If you have to prove that you have remote access to a computer but do not want to risk a demonstration that could compromise data, SSH can be very nice for a very small amount of work. There are numerous ways to either cause a major distraction or to confirm that you have access to a target device via SSH, and most are also pretty dramatic when done correctly.

Although the signs of someone remotely messing with your computer may be obvious to some, the average person not looking for clues that suggest they are being attacked and tend to strangely attribute their computer's behavior to bugs, glitches or other reasons beyond their control. With SSH access, a hacker can easily make fake reports or cause behavior to mislead others into doing what the hacker wants them to do.

Instead of being subtle, we are going to look at things that we can do through SSH, the maximum effect to scare a user on the other side.

Alarming things you can do through SSH

We have many tools at our disposal to create an alarming SSH experience. To start, we can launch applications such as Firefox to navigate to any webpage you want, or open full screen webpages or multiple smaller browser windows. Most people associate web pages that are started with a virus or adware, especially if most websites are about Viagra.

Then we can make some noise. The speakers connected to a computer represent a lot of fun that we can have, and this can take the form of an alarming beep or speech apparently from scratch. If someone thinks they are home alone, a computer shouting at them from scratch is a very unwanted surprise. The same goes for your computer that starts to squeak furiously as if it is about to explode.

If we want to be more direct, we can display frightening error messages that suggest that dangerous things are happening on the computer. By combining beep and error messages, we can create fake problems that look very serious and disturbing.

What you need

To follow this, you need a computer to which you have SSH access. This manual is based on a Ubuntu computer, but you can control most Linux computers, including MacOS, with the same commands.

You must also be on the same network as the computer that you want to operate. After you have logged in to the target computer via SSH, you can start apps and take other actions remotely.

Step 1: Launching access and basic app

To start, we must specify that we want everything we do on the external computer is displayed where we are logged in via SSH, not on the local computer with which we are logged in. To do that, we will first set our display path with the following command:

  export DISPLAY =: 0.0 

Now executing a simple command such as firefox will open a Firefox window via SSH on the external computer.

However, that is not very scary. For our first example, let's open a scary-looking xterm window that will display network data that looks rather alarming to a beginner. To make this worse, we will do it 10 times, so if they click out, a new one will be released 10 consecutive times.

To make this happen, we first use the command for i in {1..10}; followed by the code that we want to execute, and then done at the end .

  for i in {1..10}; do sudo xterm -maximize -e sudo tcpdump; done 

In this case we open a terminal window with maximum size and the command -e means that we are executing sudo tcpdump in the xterm window that we are launching. [19659006] For the average user, their computer has now started to turn off hacker shells that cannot be closed.

Step 2: Bells, Whistles & Speech

Before we can make a sound, we must execute the following command to allow us to operate the speaker remotely.

  sudo modprobe pcspkr 

After this is done, we have many options! First, we can say every sentence on the computer with the command saying . We can also use the command espeak to do the same.

  say: "I am a Canadian randomware, I have not encrypted any files, but would appreciate some change"
just say "please excuse me for bothering you" 

We can schedule this to go off periodically in a chordab, or just do it live.

If we want to be more subtle, we can use beep to drive a user crazy. To use this, make sure you have it with install apt beep .

Once you have installed it, see what you can do with it using man beep a great command

  BEEP (1) General assignments Manual BEEP (1)

NAME
beep - beep the PC speaker in different ways

SHORT CONTENT
beep [--verbose | --debug] [-e device | --device device] [-f
       N] [-l N] [-r N] [-d N] [-D N] [-s] [-c]

         beep [ OPTIONS ] [-n] [--new] [ OPTIONS ]

         beep [-h] [--help]

         beep [-v] [-V] [--version]

  DESCRIPTION
beep gives the user the ability to control the PC speaker with precision
so that different sounds can indicate differently
events. Although it can be done very happily on the command
line, the intended residence is within shell / perl
scripts to inform the user if something interesting is going on
occurs. Of course it has no idea what is interesting,
but it's really good at that informative part.

All options have default values, which means that you just type
& # 39; beep & # 39; will work. If an option is specified multiple times
on the command line, the following options take precedence over them
predecessors. So & # 39; beep -f 200 -f 300 & # 39; will beep at 300Hz.

OPTIONS
- verbose, - debug
enable debug output. With this option, a line as printed
the following for each beep:

[DEBUG] 5 times 200 ms beeps (100 delay between, 0
delay after) @ 1000.00 Hz

-e device, - device device
use device as an event device. If the switch is not used,
/ dev / tty0 and / dev / vc / 0 are tried in turn.

-f N beep at N Hz, where 0 <N <20000. As a general
margin, the regular terminal beep is around 750Hz.
N is not limited to whole numbers.

-l N beep for N milliseconds.

-r N specify the number of repetitions (default 1).

-d N, -D N
specify a delay of N milliseconds between repetitions
tions. Use of -d indicates that this must be a delay
only occur between beeps, that is, it shouldn't be
occur after the last repetition. -D indicates that
the delay must occur after each repetition,
including the last one. Normally -d is what you want,
but if, for example, you are stringing several beeps
commands & # 39; s together to play the Star Wars anthem, you
may want control over any delay.

-n, - new
with this option you can split the command line
to specify multiple beeps. Every time this
If this option is used, the beep will start processing further
arguments as if they were for a new beep. So for
example:

beep -f 1000 -n -f 2000 -n -f 1500

would produce a series of three beeps, the first
with a frequency of 1000Hz (and otherwise standard
values), followed by a second beep with a frequency of
2000Hz (again, with things like delay and repetitions
set to their default values), then a third beep, at 1500Hz.
This is different from specifying an -r value
-r repeats the same beep several times, while -n
you can specify different beeps. After a -n
the new beep is made with all default values,
and each of these can be specified without changing
values ​​for previous (or later) beeps. See the EXAM‐
PLES section if this could have confused you.

-s, -c these options make beep in input processing mode.
-s tells beep to read from stdin and beeps after each
newline, and -c tells it to do this after every charac‐
Ter. In both cases, the program will also echo the
input back to stdout, making it easy to slip
beep in a word processing pipeline, see the EXAM
PLES section.

-h, --help
view and exit usage information

-v, -V, --version
view and close version information 

We can make almost any sound with Beep. It even comes with a handy reference table for composing notes. Note Frequency
C 261.6
C # 277.2
D 293.7
D # 311.1
E 329.6
F 349.2
F # 370.0
G 392.0
G # 415.3
A 440.0
A # 466.2
B 493.9
C 523.2

In our case we are going to do something terrible. Here the flag -f sets the frequency on an ear piercing 4000 kHz, the flag -d sets the duration of the delay between beeps at 500 ms and the -l flag sets the length of the beep to one second. Finally, the flag -r repeats this terrible sound 10 times.

  beep -f 4000 -D 500 -l 1000 -r 10 

You can use this to alert everyone by thinking that his computer objects are strong for something they just did.

Step 3: Terrifying Error Messages

Confusing or alarming error messages can be a lot of fun to send because users will usually believe them until they become too absurd. There are a few different types that we can ship, some of which are crippled.

We can call up subtle small messages using the command send-notification with the title first and the message text as second.

  notify-send & # 39; WARNING & # 39; & # 39; I CALL THE INTERNET POLICE & # 39; 

A small warning appears in the corner. Quite boring. Instead, we can display this large, alarming message using whiptail and launch it in full screen.

  xterm-maximized-fullscreen -fa & # 39; Monospace & # 39; -fs 19.31 -e whiptail --title "CRITICISM: ACTION CANNOT BE UNDONE" - msgbox "UNAUTHORIZED REGISTRATION! DATA SECURITY SYSTEM WILL DESTROY THIS TERMINAL IN 10 SECONDS, STAY 30 FEET TO EXPOSE 1918" ] You can replace it with your own content, but here's what it looks like. 

Step 4: Cron Jobs from Hell

Now we can combine these and plan to execute them automatically. We can check whether there are existing tasks in the crontab with the flag -l and then add a new one with the flag -e . Crontab -1 crontab -e

From the configuration window that appears, you can add a task to perform every 60 seconds with the following formula:

  * * * * * (your code here) 

To leave the computer beeping every 60 seconds we can add this item and then press ctrl x and y to save the file.

  * * * * * beep -f 300.7 -r 10 - d 50 -l 400 

Once the file has been saved, the computer beeps every 60 seconds.

Step 5: Killing Tasks

If there is someone on the computer that you have back door access to, you can intentionally avoid the process ID of an application that they use. This causes the application to crash immediately, which can prevent someone from doing something effective on the computer.

To find the process ID, we can use top or htop to list the processes that are running on the computer. If you have not installed htop you can do this with the command below.

  apt install htop
top
Tasks: 219 in total, 1 running, 178 sleeping, 0 stopped, 0 zombie
% CPU (s): 3.0 us, 0.4 sy, 0.0 ni, 95.6 id, 0.9 wa, 0.0 hi, 0.0 si, 0.0 pc
KiB Mem: 4968836 total, 1431244 free, 1104324 used, 2433268 buff / cache
KiB Swap: 5138428 total, 5138428 free, 0 used. 3367804 available Mem

PID USER PR NI VIRT RES SHR S% CPU% MEM TIME + COMMAND
31906 root 20 0 0 0 0 I 6.2 0.0 0: 00.59 kworker / u16: 1
32560 for 20 0 41928 3880 3192 R 6.2 0.1 0: 00.02 above
1 root 20 0 160212 9592 6816 S 0.0 0.2 0: 02.35 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0: 00.01 kthreadd
4 root 0 -20 0 0 0 I 0.0 0.0 0: 00.00 kworker / 0: 0H
6 root 0 -20 0 0 0 I 0.0 0.0 0: 00.00 mm_percpu_wq
7 root 20 0 0 0 0 S 0.0 0.0 0: 01.33 ksoftirqd / 0
8 root 20 0 0 0 0 I 0.0 0.0 0: 09.13 rcu_sched
9 root 20 0 0 0 0 I 0.0 0.0 0: 00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0: 00.00 migration / 0
11 root rt 0 0 0 0 S 0.0 0.0 0: 00.03 watchdog / 0
12 root 20 0 0 0 0 S 0.0 0.0 0: 00.00 cpuhp / 0
13 root 20 0 0 0 0 S 0.0 0.0 0: 00.00 cpuhp / 1
14 root rt 0 0 0 0 S 0.0 0.0 0: 00.03 watchdog / 1 

If I want to kill the process top I just grab the PID and execute the following command.

  kill PID # 

In the above example, I would perform kill 32560 to crash the top process that is being executed.

Step 6: Composing: Rickswarm

We I want to combine everything we have learned to create vivid experiences for anyone who happens to be on the computer to which we have access. Let's take our alarming random beep and combine it with some bash commands & # 39; s to open a lot of Firefox windows every 60 seconds, all navigating to "Never Gonna Give You Up"

  for i in { 1..10}; beep -f 4000 -D 500 -l 1000 -r 10 & firefox-new window "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; done 

SSH access makes a computer easy to pursue

While causing maximum distraction and disruption via SSH is not something that pops up daily it is very nice and very useful for social engineering. Although this is a nice joke, it is of course a very bad idea to do this on the computer of someone you don't have permission for, because people who are not technically skilled will probably think something much worse than a joke and out of fear. It is not legal to access a device for which you do not have permission, so keep your SSH for pen testing and devices that you have access to!

I hope you enjoyed this guide for chasing a computer with SSH! If you have questions about this tutorial on SSH jokes or have a comment, ask them below or feel free to reach me on Twitter @KodyKinzie .

Cover image via 123RF




Source link