Unit 4
Unit 4
Unit-4
Tools and Methods Used in Cybercrime: Introduction, Proxy Servers and
Anonymizers, Phishing, Password Cracking, Keyloggers and Spywares, Virus and
Worms, Trojan Horse und Backdoors, Steganography, DoS and DDoS attacks, SQL
Injection, Buffer Overflow.
4.1 Introduction
Different forms of attacks through which attackers target the computer systems are
as follows
1. Initial uncovering:
At the network probe stage, the attacker scans the organization information
through a <ping sweep= of the network IP addresses.
And then a <port scanning= tool is used to discover exactly which services are
running on the target system.
At this point, the attacker has still not done anything that would be
considered as an abnormal activity on the network or anything that can be
classified as an intrusion.
3. Crossing the line toward electronic crime (E-crime):
Once the attackers are able to access a user account, then they will attempt
further exploits to get an administrator or <root= access.
Root access is a UNIX term and is associated with the system privileges required
to run all services and access all files on the system (readers are expected to have
a basic familiarity with Unix-based systems).
<Root= is basically an administrator or super-user access and grants them the
privileges to do anything on the system.
4. Capturing the network:
The attacker will usually install a set of tools that replace existing files and
services with Trojan files and services that have a backdoor password.
5. Grab the data:
Now that the attacker has <captured the network,= he/she takes advantage of
his/her position to steal confidential data
6. Covering tracks:
This is the last step in any cyber attack, which refers to the activities
undertaken by the attacker to extend misuse of the system without being detected.
The attacker can remain undetected for long periods.
During this entire process, the attacker takes optimum care to hide his/her
identity (ID) from the first step itself.
4.2 Proxy Servers and Anonymizers
Proxy server is a computer on a network which acts as an intermediary for
connections with other computers on that network.
The attacker first connects to a proxy server and establishes a connection with
the target system through existing connection with proxy.
This enables an attacker to surf on the Web anonymously and/or hide the attack.
A client connects to the proxy server and requests some services (such as a
file, webpage) available from a different server.
The proxy server evaluates the request and provides the resource by
establishing the connection to the respective server and/or requests the
required service on behalf of the client.
Using a proxy server can allow an attacker to hide ID (i.e., become anonymous on
the network).
A proxy server has following purposes:
1. Keep the systems behind the curtain (mainly for security reasons).
2. Speed up access to a resource (through <caching=). It is usually used to cache
number of computers on the Internet, whenever one has only one IP address
One of the advantages of a proxy server is that its cache memory can serve all
users.
If one or more websites are requested frequently, may be by different users, it is
likely to be in the proxy’s cache memory, which will improve user response time.
An anonymizer or an anonymous proxy is a tool that attempts to make activity
on the Internet untraceable. It accesses the Internet on the user’s behalf,
protecting personal information by hiding the source computer’s identifying
information.
Anonymizers are services used to make Web surfing anonymous by utilizing a
website that acts as a proxy server for the web client.
4.3 Phishing
passwords.
3. To gain unauthorized access to a system.
1. Blank (none);
2. the words like <password,= <passcode= and <admin=;
3. series of letters from the <QWERTY= keyboard, for example, qwerty, asdf or
qwertyuiop;
4. user’s name or login name;
5. name of user’s friend/relative/pet;
6. user’s birthplace or date of birth, or a relative’s or a friend’s;
stored value. If they match, user gains the access; this process is called
authentication.
The most commonly used hash functions can be computed rapidly and the attacker
can test these hashes with the help of passwords cracking tools (see Table 4.3) to get
the plain text password.
Password Cracking Tools: Default Password, Cain & Abel , John the Ripper, THC-
Hydra , Aircrack-ng LophtCrack, AirSnort , Solar Winds , Pwdump , RainbowCrack ,
Brutus
Password cracking attacks can be classified under three categories as follows:
1. Online attacks;
2. offline attacks;
An attacker can create a script file that will be executed to try each password in
a list and when matches, an attacker can gain the access to the system.
The most popular online attack is man-in-the middle (MITM) attack, also
termed as <bucket- brigade attack= or sometimes <Janus attack.=
It is a form of active stealing in which the attacker establishes a connection
between a victim and the server to which a victim is connected.
When a victim client connects to the fraudulent server, the MITM server
intercepts the call, hashes the password and passes the connection to the victim
server (e.g., an attacker within reception range of an unencrypted Wi-Fi wireless
access point can insert himself as a man-in- the-middle).
This type of attack is used to obtain the passwords for E-Mail accounts on public
websites such as Yahoo, Hotmail and Gmail and can also used to get the
passwords for financial websites that would like to gain the access to banking
websites.
Offline Attacks
Mostly offline attacks are performed from a location other than the target (i.e.,
either a computer system or while on the network) where these passwords reside
or are used.
Offline attacks usually require physical access to the computer and copying the
password file from the system onto removable media.
Strong, Weak and
Random
Passwords Weak
passwords:
A weak password is one, which could be easily guessed, short, common and a
system default password that could be easily found by executing a brite force attack
and by using a subset of all possible passwords.
• The password contains less than eight characters
@#$%^&*()_+|~-
=\`{}[]:";'<>?,./)
• Are at least eight alphanumeric characters long.
• Are not a word in any language, slang, dialect, jargon, etc.
phrase.
• For example, the phrase might be: "This May Be One Way To Remember" and
the password could be: "TmB1w2R!" or "Tmb1W>r~" or some other variation.
Random passwords
Secure Password Generator
Password Length, Include Symbols ( e.g. @#$% ) , Include Numbers: ( e.g. 123456
) , Include Lowercase Characters: ( e.g. abcdefgh ) ,Include Uppercase Characters:
( e.g. ABCDEFGH ), Exclude Similar Characters: ( e.g. i, l, 1, L, o, 0, O ) ,Exclude
Ambiguous Characters: ( { } [ ] ( ) / \ ' " ` ~ , ; : . < > ) , Generate On The Client
Side: ( do NOT send across the Internet ) , Auto-Select: ( select the password
automatically ) , Save My Preference: ( save all the settings above for later use ) ,
Load My Settings Anywhere: URL to load my settings on other computers quickly ,
Your New Password: Remember your password: Remember your password with
the first letters of each word in this sentence.
To prevent your passwords from being hacked by social engineering, brute force or
dictionary attack method, you should notice that:
11. Be careful when using online paste tools and screen capture tools, do not let
them to upload your passwords to the cloud.
12. If there are important files on your computer, and it can be accessed by others,
check if there are hardware keyloggers( e.g. wireless keyboard sniffer ), software
key loggers and hidden cameras when you feel it's necessary.
Password guidelines
1. Passwords used for business E-Mail accounts, personal E-Mail accounts and
banking/financial user accounts should be kept separate.
2. Passwords should be of minimum eight alphanumeric characters (common
names or phrases should be phrased).
3. Passwords should be changed every 30/45 days.
should be changed from a secured system, within couple of days, if these E-Mail
accounts has been accessed from public Internet facilities such as cyber
cafes/hotels/libraries.
7. Passwords should not be stored under mobile phones/PDAs, as these devices are
also prone to cyber attacks.
8. In case E-Mail accounts/user accounts have been hacked, respective
agencies/institutes should be contacted immediately.
4.5 Keyloggers and Spywares
Keystroke logging, often called keylogging, is the practice of noting (or logging)
the keys struck on a keyboard, typically in a covert manner so that the person
using the keyboard is unaware that such actions are being monitored.
Keystroke logger or keylogger is quicker and easier way of capturing the
passwords and monitoring the victims’ IT savvy behavior. It can be classified as
software keylogger and hardware keylogger.
4.5.1 Software Keyloggers
Software keyloggers are software programs installed on the
computer systems which usually are located between the OS and the keyboard
hardware, and every keystroke is recorded.
Software keyloggers are installed on a computer system by Trojans or viruses
without the knowledge of the user.
Cybercriminals always install such tools on the insecure computer systems
available in public places (i.e., cybercafés, etc) and can obtain the required
information about the victim very easily.
A keylogger usually consists of two files that get installed in the same directory: a
dynamic link library (DLL) file and an EXEcutable (EXE) file that installs the
DLL file and triggers it to work. DLL does all the recording of keystrokes.
4.5.4 Spywares
Spyware is a type of malware (i.e., malicious software) that is installed on
computers which collects information about users without their knowledge.
The presence of Spyware is typically hidden from the user; it is secretly installed on
the user’s personal computer.
Sometimes, however, Spywares such as keyloggers are installed by
the owner of a shared, corporate or public computer on purpose to
secretly monitor other users.
Some Important Spywares are as follows
Spy. Spector Pro. Spector Pro.
eBlaster. Remotespy . Stealth Recorder Pro.
Stealth Website Logger. Flexispy. Wiretap Professional.
PC Phone Home. Spy Arsenal Print Monitor
Pro.
•Computer virus has the ability to copy itself and infect the system.
•The term virus is also commonly but erroneously used to refer to other types of
malware, Adware and Spyware programs that do not have reproductive ability.
•A true virus can only spread from one system to another (in some form of
executable code) when its host is taken to the target computer; for instance, when
a user sent it over the Internet or a network, or carried it on a removable media
such as CD, DVD or USB drives.
5. Polymorphic viruses: It acts like a “chameleon” that changes its virus signature
(i.e., binary pattern) every time it spreads through the system (i.e., multiplies and
infects a new file). Hence, it is always difficult to detect polymorphic virus with
the help of an antivirus program.
6. Macro viruses: Many applications, such as Microsoft Word and Microsoft
Excel, support MACROs (i.e., macro languages). These macros are programmed
as a macro embedded in a document. Once macro virus gets onto a victim’s
computer then every document he/she produces will become infected.
7. Active X and Java Control: All the web browsers have settings about Active X
and Java Controls.
World’s worst worm attacks.
Conficker INF/AutoRun Win32 PSW Win32/Agent
Win32/FlyStudio Win32/Pacex.Gen Win32/Qhost WMA/ Trojan Downloader
•Unlike viruses or worms, Trojans do not replicate themselves but they can be
equally destructive.
•On the surface, Trojans appear benign and harmless, but once the infected code
is executed, Trojans kick in and perform malicious functions to harm the
computer system without the user’s knowledge.
•For example, waterfalls.scr is a waterfall screen saver as originally claimed by
the author; however, it can be associated with malware and become a Trojan to
unload hidden programs and allow unauthorized access to the user’s PC.
4.8 Steganography
•Steganography is the practice of concealing (hiding) a file, message, image, or
video within another file, message, image, or video. The word
steganography combines the Greek words steganos , meaning "covered,
concealed, or protected", and graphein meaning "writing".
•It is a method that attempts to hide the existence of a message or
communication.
•Steganography is always misunderstood with cryptography
•The different names for steganography are data hiding, information hiding and
digital watermarking.
•Steganography can be used to make a digital watermark to detect illegal copying
of digital images. Thus, it aids confidentiality and integrity of the data.
•Digital watermarking is the process of possibly irreversibly embedding
information into a digital signal.
•The Digital signal may be, for example, audio, pictures or video.
•If the signal is copied then the information is also carried in the copy.
•In other words, when steganography is used to place a hidden trademark in
images, music and software, the result is a technique referred to as watermarking
4.8.1 Steganalysis
•Steganalysis is the art and science of detecting messages that are hidden in
images, audio/video files using steganography.
•The goal of steganalysis is to identify suspected packages and to determine
whether or not they have a payload encoded into them, and if possible recover it.
•Automated tools are used to detect such Steganography data/information
hidden in the image and audio and/or video files.
4.8.2 Difference between Steganography and Cryptography
Steganography is the art and science of writing hidden messages in such a way
that no one apart from the intended recipient knows the existence of the
message; this is in contrast to cryptography, of the message itself is not disguised,
but the content is obscured. It is said that terrorists use where the existence
steganography techniques to hide their communication in images on the
Internet; most popular images are used such as those of film actresses or other
celebrities. In its basic form, steganography is simple.
4.9 DoS and DDoS Attacks
•A denial-of-service attack (DoS attack) or distributed denial-of-service attack
(DDoS attack) is an attempt to make a computer resource (i.e., information
systems) unavailable to its intended users.
DoS Attacks
•In this type of criminal act, the attacker floods the bandwidth of the victim’s
network or fills his E-Mail box with Spam mail depriving him of the services he is
entitled to access or provide.
•The attackers typically target sites or services hosted on high-profile web servers
such as banks, credit card payment gateways, mobile phone networks and even
root name servers
•Buffer overflow technique is employed to commit such kind of criminal attack
known as Spoofing.
•The term IP address Spoofing refers to the creation of IP packets with a forged
(spoofed) source IP address with the purpose of concealing the ID of the sender
or impersonating another computing system.
•A packet is a formatted unit of data carried by a packet mode computer network.
•The attacker spoofs the IP address and floods the network of the victim with
repeated requests.
•As the IP address is fake, the victim machine keeps waiting for response from
the attacker’s machine for each request.
•This consumes the bandwidth of the network which then fails to serve the
legitimate requests and ultimately breaks down.
•The United States Computer Emergency Response Team defines symptoms of
DoS attacks to include:
1.Unusually slow network performance (opening fi les or accessing websites);
2.unavailability of a particular website;
3.inability to access any website;
4.dramatic increase in the number of Spam E-Mails received (this type of DoS
attack is termed as an E-Mail bomb).
The goal of DoS is not to gain unauthorized access to systems or data, but to
prevent intended users (i.e., legitimate users) of a service from using it.
A DoS attack may do the following:
1.Flood a network with traffic, thereby preventing legitimate network traffic.
2.Disrupt connections between two systems, thereby preventing access to a
service.
3.Prevent a particular individual from accessing a service.
4.Disrupt service to a specific system or person.
4.9.1 Classification of DoS Attacks
1.Bandwidth attacks: Loading any website takes certain time. Loading means
complete webpage appearing on the screen and system is awaiting user’s input.
2.Logic attacks: These kind of attacks can exploit vulnerabilities in network
software such as web server or TCP/IP stack.
Tools and Methods Used in Cybercrime Page 22
Cyber Security Unit-4
3. Protocol attacks: Protocols here are rules that are to be followed to send data
over network.
4. Unintentional DoS attack : This is a scenario where a website ends up denied
not due to a attack by a single individual or group of individuals, but simply due
to a sudden enormous spike in popularity.
4.9.2 Types or Levels of DoS Attacks
There are several types or levels of DoS attacks as follows:
1.Flood attack: This is the earliest form of DoS attack and is also known as ping
food. It is based on an attacker simply sending the victim overwhelming number
of ping packets, usually by using the
<ping= command, which result into more traffic than the victim can handle.
2.Ping of death attack: The ping of death attack sends oversized Internet Control
Message Protocol (ICMP) packets, and it is one of the core protocols of the IP
Suite. It is mainly used by networked computers’ OSs to send error messages
indicating (e.g., that a requested service is not available or that a host or router
could not be reached) datagrams (encapsulated in IP packets) to the victim.
3.SYN attack: It is also termed as TCP SYN Flooding. In the TCP, handshaking of
network connections is done with SYN and ACK messages.
An attacker initiates a TCP connection to the server with an SYN.
The server replies with an SYN-ACK.
The client then does not send back an ACK, causing the server to allocate
memory for the pending connection and wait.
This fills up the buffer space for SYN messages on the target system,
preventing other systems on the network from communicating with the
target system.
4. Teardrop attack: The teardrop attack is an attack where fragmented packets
are forged to overlap each other when the receiving host tries to reassemble
them. IP’s packet fragmentation algorithm is used to send corrupted packets to
confuse the victim and may hang the system. Th is attack can crash various OSs
attacks.
2. If such filters are available for your system, install patches to guard against
TCP SYN flooding.
3. Disable any unused or inessential network service.
4. Enable quota systems on your OS if they are available.
Here are few examples of variable field text the attacker uses on a webpage to
test for SQL vulnerabilities:
1.Blah’ or 1=1--
2.Login:blah’ or 1=1--
3.Password::blah’ or 1=1--
4.http://search/index.asp?id=blah’ or 1=1--
Similar SQL commands may allow bypassing of a login and may return many
rows in a table or even an entire database table because the SQL server is
interpreting the terms literally. The double dashes near the end of the
command tell SQL to ignore the rest of the command as a comment.
4.10.2 Blind SQL Injection
•Blind SQL injection is used when a web application is vulnerable to an SQL
injection but the results of the injection are not visible to the attacker.
•The page with the vulnerability may not be the one that displays data;
however, it will display differently depending on the results of a logical
statement injected into the legitimate SQL statement called for that page.
•This type of attack can become time-intensive because a new statement must
be crafted for each bit recovered.
•There are several tools that can automate these attacks once the location of the
vulnerability and the target information have been established.
4.10.3 How to Prevent SQL Injection Attacks
SQL injection attacks occur due to poor website administration and coding. The
following steps can be taken to prevent SQL injection.
1. Input validation
•Replace all single quotes to two single quotes.
•Sanitize the input: User input needs to be checked and cleaned of any
characters or strings that could possibly be used maliciously. For example,
character sequences such as ; , --, select, insert and xp_ can be used to
perform an SQL injection attack.
•Numeric values should be checked while accepting a query string value.
Function – IsNumeric() for Active Server Pages (ASP) should be used to
check these numeric values.
•Keep all text boxes and form fields as short as possible to limit the length of
user input.
2.Modify error reports: SQL errors should not be displayed to outside users
3.Other preventions
•The default system accounts for SQL server 2000 should never be used.
•Isolate database server and web server.
4.11 Buffer Overflow
•Buffer overflow, or buffer overrun, is an anomaly where a process stores data in
a buffer outside the memory the programmer has set aside for it.
•This may result unreliable program behavior, including memory access errors,
incorrect results, program termination (a crash) or a breach of system security.
•Buffer overflows can be triggered by inputs that are designed to execute code or
alter the way the program operates.
•They are, thus, the basis of many software vulnerabilities and can be maliciously
exploited. Bounds checking can prevent buffer overflows.
3. Once a function has completed its cycle, the reference to the variable in the
stack is removed.
The attacker may exploit stack-based buffer overflows to manipulate the program
in various ways by overwriting:
1.A local variable that is near the buffer in memory on the stack to change the
behavior of the program that may benefit the attacker.
2.The return address in a stack frame. Once the function returns, execution will
resume at the return address as specified by the attacker, usually a user input-
filled buffer.
3. A function pointer, or exception handler, which is subsequently executed.
The factors that contribute to overcome the exploits are
1.Null bytes in addresses;
2.Variability in the location of shell code;
3.Differences between environments.
A shell code is a small piece of code used as a payload in the exploitation of
software vulnerability. It is called <shell code= because it starts with command
shell from which the attacker can control the compromised machine.
NOPs
NOP or NOOP (short form of no operation) is an assembly language instruction/
command that effectively does nothing at all.
Heap Buffer Overflow
Heap buffer overflow occurs in the heap data area and may be introduced
accidentally by an application programmer, or it may result from a deliberate
exploit. The characteristics of stack- based and heap-based programming are as
follows:
1.<Heap= is a <free store= that is a memory space, where dynamic objects are
allocated.
2.The heap is the memory space that is dynamically allocated new(), malloc() and
calloc() functions; it is different from the memory space allocated for stack and
code.
Tools and Methods Used in Cybercrime Page 30
Cyber Security Unit-4
3.Dynamically created variables (i.e., declared variables) are created on the heap
before the execution program is initialized to zero.
Memory on the heap is dynamically allocated by the application at run-time and
normally contains program data. Exploitation is performed by corrupting this
data in specific ways to cause the application to overwrite internal structures such
as linked list pointers.
4.11.2 How to Minimize Buffer Overflow
Although it is difficult to prevent all possible attacks, the following methods will
definitely help to minimize such attacks:
1. Assessment of secure code manually: Buffer overflow occurs when a program
or process tries to
store more data in a buffer than it was intended to hold. Developers should be
educated about minimizing the use of functions like strcpy(), strcat(), sprintf()
and vsprintf() in C Language.
2.Disable stack execution: Malicious Code causes input argument to the program,
and it resides in the stack and not in the code segment. Any code that attempts to
execute any other code residing in the stack will cause a segmentation violation.
3.Compiler tools: Over the years, compilers have become more and more
aggressive in optimizations and the checks they perform. Various compiler tools
already off er warnings on the use of unsafe constructs such as gets(), strcpy(),
etc. Developers should be educated to restructure the programming code if such
warnings are displayed.
4.Dynamic run-time checks: In this scheme, an application has restricted access
to prevent attacks. This method primarily relies on the safety code being
preloaded before an application is executed. This preloaded component can
either provide safer versions of the standard unsafe functions or it can ensure
that return addresses are not overwritten. One example of such a tool is libsafe.
The libsafe library provides a way to secure calls to these functions, even if the
function is not available.