EHCP Lec 13 System Hacking-II
EHCP Lec 13 System Hacking-II
resentation includes contents available online including images copied from Google search and contents of presentations of other professors. I don’t claim any image or text to be my own. All the credit goes to the
ESCALATING PRIVILEGES
• ESCALATING PRIVILEGES:
• What to do after gaining access to the target.
• Prior to anything after gaining access, you have to perform privilege escalation to have
complete high-level access with no or limited restrictions.
• HORIZONTAL PRIVILEGES
ESCALATION:
• Horizontal privileges escalation, an attacker attempts to take
command over the privileges of another user having the same set of
privileges for his account.
• Horizontal privileges escalation occurs when an attacker is attempting
to gain access to the same set of resources allowed for the particular
user.
ESCALATING PRIVILEGES
• VERTICAL PRIVILEGES ESCALATION:
• In vertical privileges escalation, an attacker attempts to escalate privileges to a
higher level.
• Higher privileges allow the attacker to access sensitive information, install, modify
and delete files and programs such as a virus, trojans, etc.
ESCALATING PRIVILEGES
• PRIVILEGE ESCALATION USING DLL HIJACKING:
• Applications need dynamic link libraries (dll) for executable files to run.
• In windows operating system, most of the application search for dll in directories instead of
using fully qualified path.
• Once these dlls are renamed with exactly the same name of legitimate dlls and replaced in
the directory, the executable file will load malicious dll from application directory instead of
real dll.
PRIVILEGE ESCALATION USING DLL HIJACKING:
ESCALATING PRIVILEGES
• PRIVILEGE ESCALATION USING DLL HIJACKING:
• Using dll hijacking tool, such as metasploit can be used for generating dll which returns with
a session with privileges.
• When application run, it will open the session with system privileges.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
Session Manager\
ESCALATING PRIVILEGES
• PRIVILEGE ESCALATION USING DLL HIJACKING:
• The application normally searches for dll in the exact directory if it is configured
with the fully qualified path, else, if the application is not using specified path it
may search in the following search paths used by microsoft:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
Session Manager\
EXECUTING APPLICATIONS
• EXECUTING APPLICATIONS:
• Once an attacker gains unauthorized access to the system and escalates privileges.
• Next step of the attacker is to execute malicious applications on the target system.
• This execution of malicious programs is intended for gaining unauthorized access to system
resources, crack passwords, set up backdoors, and for other motives.
• This process, execution of the application is also called as "system owning." The attacker is
to own the system.
EXECUTING APPLICATIONS
• EXECUTING APPLICATIONS:
• Intentions or goals, an attacker, wanted to achieve by executing such malicious
application are: -
• To install keyloggers for gathering information via input devices such as a keyboard.
EXECUTING APPLICATIONS
• REMOTE EXEC:
• Remoteexec is a software designed for installation of the application, execution of code and
scripts remotely.
• Additionally, remoteexec can update files on the target system across a network. Major
features offered by the remoteexec application are: -
• PDQ deploy allow or assist the admin in installing application and software to a particular
system as well as multiple systems in a network.
• It can silently deploy almost every application (such as .Exe) to the target system.
• Using PDQ deploy, you can install and uninstall, copy, execute and send files.
EXECUTING APPLICATIONS
• KEYIOGGERS:
• Keystroke logging, keylogging and keyboard capturing is a process of monitoring or
recording the actions performed by any user such as monitoring a user using keyboard using
keyloggers.
• The major purpose of using keyloggers are monitoring data copied to the clipboard,
screenshots captured by the user, screen logging by capturing a screenshot at every moment
even when the user just clicked.
TYPES OF KEYSTROKE LOGGERS
SOFTWARE KEYLOGGERS:
•Software-based keyloggers are remotely installed, or an attacker may send it to user and user
can accidentally execute the application.
• Application keyloggers
• Kernel keyloggers
• Hypervisor-based keyloggers
• Form grabbing based keyloggers
TYPES OF KEYSTROKE LOGGERS
HARDWARE KEYLOGGERS:
•Hardware-based keyloggers are physical hardware's or keyloggers which are installed on
hardware by physically accessing the device.
•Firmware- based keyloggers requires physical access the to the machine to load the software
into bios, keyboard hardware such as key grabber USB is a physical device needs to be
installed inline with the keyboard.
TYPES OF KEYSTROKE LOGGERS
HARDWARE KEYLOGGERS:
•Hardware keyloggers are further classified into following types includes: -
• PC/BIOS embedded keyloggers
• Keyloggers keyboard
• External keyloggers Hardware Keyloggers Webcite
KeyGrabber USB http://www.keydemon.co
KeyGrabber PS/2 m/
http://www.keydemon.co
VideoGhost m/
http://
www.keydemon.com/
KeyGrabber Nano Wi-Fi http://
www.keydemon.com/
KeyGrabber Wi-Fi Premium http://
www.keydemon.com/
KeyGrabber TimeKeeper http://
www.keydemon.com/
KeyGrabber Module http://
www.keydemon.com/
KeyGhost USB Keylogger http://
TYPES OF KEYSTROKE LOGGERS
ANTI-KEYLOGGERS:
•Anti-keyloggers are application software which ensures protection against keylogging.
•This software eliminates the threat of keylogging by providing ssl protection, keylogging
protection, clipboard logging protection and screen logging protection.
• Kernel-level rootkits:- the kernel is the core of an OS. Kernel-level rootkits add additional
codes (malicious), replace the section of codes of original operating system kernel.
HIDING FILES
• TYPES OF ROOTKITS:-
• Hardware / firmware level rootkits:-type of rootkits that hides in hardware such as hard
drive, network interface card, system BIOS.
• These rootkits are built into a chipset for recovering stolen computers, delete data, or render
them useless.
• Additionally, rootkits has privacy and security concerns of undetectable spying.
• Hypervisor level rootkits:- hypervisor level rootkits exploits hardware features like amd-v
(hardware-assisted virtualization technologies) or intel vt, which hosts the target os as a
virtual machine..
HIDING FILES
• TYPES OF ROOTKITS:-
• Boot loader level rootkits:- bootloader level rootkits (bootkits) replaces the legitimate boot
loader with the malicious one which enables the bootkits to be activated before an os run.
• Bootkits are a serious threat to the system security because they can infect startup codes such
as master boot record (mbr), volume boot record (vbr) or boot sector.
• It can be used to attack full disk encryption systems, hack encryption keys and passwords.
HIDING FILES
• ROOTKIT TOOLS:-
• Avatar
• Necurs
• Azazel
• Zeroaccess
HIDING FILES
• ROOTKIT TOOLS:-
• Detecting & defending rootkits:- integrity-based detection, using digital signatures, difference-based
detection, behavioral detection, memory dumps, and other approaches can be used for detecting rootkits.
• In unix platform, rootkit detection tools such as zeppoo, chrootkit and other tools are available for
detection.
• In windows, microsoft sysinternals rootkitrevealer, avast and gophos anti-rootkit software are available.
NTFS DATA STREAM
• NTFS DATA STREAM:-
• NTFS stands for new technology file system.
• NTFS is a Windows proprietary file system by Microsoft.
• NTFS was the default file system of Windows NT s.1.
• It is also the primary file system for Windows 11, 10, 8, 7, Vista, XP, 2000, and Windows
NT operating systems.
ALTERNATE DATA STREAM
• ALTERNATE DATA STREAM:-
• Alternate data streams (ADS) is a file attribute in NTFS file system.
• This feature of NTFS contains metadata for locating a particular file.
• Ads feature was introduced for macintosh hierarchical file system (HFS).
• Ads is capable of hiding file data into an existing file without altering or modifying any
noticeable changes.
• In a practical environment, ads is a threat to security because of its data hiding capability
which can hide a malicious piece of data hidden in a file which can be executed when an
attacker decides to run.
NTFS DATA STREAM
NTFS DATA STREAM
NTFS DATA STREAM
ALTERNATE DATA STREAMS
DEMONSTRATION
D:\>echo Just a plan text file>sample.txt (This will create
sample.txt file in D)