Publications

How To Test SQL Injection

How To Test SQL Injection

Aytekin Done

SQL injection is a web security vulnerability that replaces the OWASP (Open Web Application Security Project) Top 10 every year. In shortly, SQL injection is caused by the fact that the data from the user is directly included in the SQL query.

In the example below, there is a simple login page written in asp language.

         FUsername = Request.Form("username")
         FPassword = Request.Form("password")

               Set RsLogin = SQLConn.Execute("SELECT * FROM Members WHERE username =      '" & FUsername & "' AND Password = '" & FPassword & "'")

         If RsLogin.EOF AND RsLogin.BOF Then
                Response.Redirect "/error.asp"

         Else
               Session("login") = RsLogin("user_id")
             Response.Redirect "../"

         End If

Let’s examine this code.

Brute Forcing SSH with Hydra

Aytekin Done

The secure shell, SSH protocol is a network protocol that is used to establish an encrypted channel across an open network between a server and a client. In general, a public/private key pair allows users to log in to a system without requiring the password. The public key is present on all systems that require a secure connection. The authentication is based on the private key, well SSH verifies the private key against the public key. On the target systems, the public key is verified against a list of authorized keys that are permitted to remotely access the system. This supposedly secured the communication between the client and the server. SSH is vulnerable to a Brute-Force Attack that guesses the user’s access credentials. For this example, we will use a tool called Hydra. It also supports attacks against the greatest number of target protocols. Let’s start cracking. There are two versions of Hydra. The command-line version, and the GUI version, which is called Hydra-GTK.  So for this example, we will invoke Hydra from the command line.

How to Disable Recursion on Windows DNS Server

Aytekin Done

Hackers have noticed that many  DNS servers on the internet have accepted requests for external recursive queries, that the administrators did not pay attention to them. Then, they created fraudulent queries for these servers and attacked the servers and the target DNS server with recursive queries. DOS attacks increased with the growth of packet sizes. We can set DNS server to not respond to these queries as follows.

1.Right-click on the DNS Server name and enter the Properties field.

Useful Linux Commands-2

Aytekin Done

Files

CommandDescription
ls -laLists files l: Use a long listing format a: List all entries including those starting with a dot
pwdDisplays working directory
rmis used to delete files. When used recursively, it may be used to delete directories.
rm -rRemoves directories and their contents recursively.
rm -fIgnores nonexistent files, and never prompt before removing.
rm -rfforces the directory to delete
cpis makes copies of files and directories.
cp -rCopıes directories recursively.
mvmoves, or renames, files and directories on your filesystem.
ln -sCreates a symbolic link
touchis also an easy way to create empty files.
catreads data from files, and outputs their contents.
moreis a filter for paging through text one screen at a time.
headDisplays first 10 lines of the file content
tailDisplays the last 10 lines of the contents of the file
tail -fDisplays the last 10 lines of the contents of the file in real time

Processes

Useful Linux Commands-1

Aytekin Done

I compiled useful linux commands

System

CommandDescription
uname -aDisplays system information
uname -rDisplays kernel version
uptimeGives a one-line display the current time, how long the system has been running, how many users are currently logged on, the system load averages for the past 1, 5, and 15 minutes
hostnameDisplays the system host name
last rebootDisplay last reboot times
dateDisplays the system date and time
calDisplay the calendar for this month, with today highlighted
wDisplays a list of logged on users and their processes as shown below
whoamiDisplays the name of the user who runs the command
finger itechDisplay information about the user itech

Hardware