Book Review ,Weekly Summary and Lab work

profileShrikaa
AdvancedPersistentThreatHacking-week7.pptx

Advanced Persistent Threat Hacking Week 7

By

Professor Henry A. McKelvey

Remote Presence Reconnaissance (Finding out about people)

Information

Home Addresses

Travel Habits

Places Frequented

Associations (Business and Personal)

Information on People

Where to look

Spokeo

Intelius

People Finder

Many public and private databased

Place People Go (Easier Said Than Done)

Happy Hour

Team Functions

After Hours get away

Social Spear Phishing

Uses secondary targets as entry vectors

Family members

Friends

Associates

Target goal

Compromise computers of

Friends (Why)

Family (Why)

Client Hacking

After all else has failed, go in through the front door

Hack the Client instead of the network

Possible targets

Smart Phones

Tablets

E-readers

Point of Sale Systems

Specialized handheld systems

Now Let’s talk about Base64

What is Encoding?

What is Encryption?

What is Base64?

How is Base64 Used?

How does the Algorithm Work?

Why is Base64 so weak?

What are some issues to know about Base64

What is Encoding?

Encoding is the process of transforming information from one format into another.

– Transfer

– Storage

– Formatting (An example would be changing text to binary)

What is Encryption?

a type of encoding that obscures information to make it unreadable without a specific key.

An example would be the Caesar Cypher. Without knowledge of the cypher “key” of Knowledge about the cypher decryption is hard.

What is Base64?

Positional notation – a quadrosexagesimal number system.

What is a quadrosexagesimal number?

A number that is broken up into four sets of six

Numerals 0-9, alphabetical characters a-z and A-Z plus two special characters (all printable ASCII)

VGhlIHF1aWNrIGJyb3duIGZveCByYW4gb3ZlciB0aGUgbGF6eSBkb2c=

0-9 are used

a-z and A-Z are used

\ = are used (= is used for pad) (pad means padding or filling)

Base64 Symbol Layout

What is Base64 Used For?

“Binary to text” encoding.

Primarily used in SMTP – simple mail transfer protocol allows only 7-bit ASCII characters to be used.

Base64 will encode any bit stream as a sequence of 7-bit ASCII characters (ie. Binary data to plaintext).

Multipurpose Internet Mail Extensions

UTF-7

Anti-spam evasion

Binary data embedded in XML

How does the Algorithm Work?

Binary data is split into groups of 24 bits (3 bytes), then

split into 6-bit chunks and converted to the corresponding

ASCII characters.

See next page

How does the Algorithm Work? (Cont)

Part of the original bit stream = 011010110110101001101011

24 bits = 3 bytes

6-bit chunks = 011010 110110 101001 101011

4 sets of 6

Decimal Conversion = 26 54 41 43

The binary 011010 is decimal 26

The binary 110110 is decimal 54

The binary 101001 is decimal 41

The binary 101011 is decimal 43

Base 64 Conversion = a2pr

The Decimal 26 is ASCII a

The Decimal 54 is ASCII 2

The Decimal 41 is ASCII p

The Decimal 43 i s ASCII r

Odd Number of Bits

What if we don't have a multiple of 3 bytes in our bit stream? (We have to get a little creative).

01100010011011000111010101100101

Becomes

011000 100110 110001 110101

24 38 49 53

Ymx1

011001 01xxxx xxxxxx xxxxxx

25 26

ZQ

which translates to

011000 100110 110001 110101

24 38 49 53

Ymx1

011001 010000 000000 000000

25 26 0 0

ZQ==

Why is Base64 weak

If you think about it Base64 is simple (refer to the chart), which allows it to have flaws, but still be useful in some case such as its use in SMTP to provide a basic level of encryption which is a form of encoding

Base64 is predictable and too well known as a standard.

Decryption can be done with simple tools such as with a pencil and paper. Also a a little time.

Some of the issues with Base 64

33% increase in size of the file being encoded

ASCII85, Quoted-printable, 8BITMIME

Privacy-Enhanced Electronic Mail was the first place where base64 was used

Headers usually describe if a message is encoded in base64, it is up to the client to translate (client side translation)