Author Topic: how find 0 days in port services ?  (Read 3379 times)

0 Members and 1 Guest are viewing this topic.

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
how find 0 days in port services ?
« on: October 10, 2011, 07:42:19 am »
well guys Ive been wondering how is the architecture of this kinds of attacks as this:
http://www.zerodayinitiative.com/advisories/ZDI-11-279/
Code: [Select]
Vulnerability Details
This vulnerability allows remote attackers to execute arbitrary code on
vulnerable installations of Witness Systems eQuality Suite. This application is
bundled with Nortel Contact Recording and Quality Monitoring Suite.
Authentication is not required to exploit this vulnerability.
The flaw exists within the Unify2.exe component which listens by default on
TCP port 6821. When handling a packet type the process trusts a remaining packet
length value provided by the user and blindly copies user supplied data into a
fixed-length buffer on the stack. A remote attacker can exploit this
vulnerability to execute arbitrary code under the context of the SYSTEM
user.
so I underestand that an attacker sends a packet of data with like a bufferoverflow right? then its executed into the system ?
my first question is if I want to develop an exploit like this my steps would be :
1-.create a tool that ports that service target
2-.send a packet of data with the exploit
so I could do porting with any language right? and the exploit part Id need to insert the bufferoverflow into that packet of data?
thats my question Ive been interested onto this kinds of attacks since a long time so any guidance please? thanks
-gh0st
« Last Edit: October 10, 2011, 08:53:24 am by gh0st »

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: how to exploiting port services ?
« Reply #1 on: October 10, 2011, 07:46:41 am »
guidance???,    u know the exact working behind BoF ?,
« Last Edit: October 10, 2011, 07:46:57 am by Factionwars »
~Factionwars

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how to exploiting port services ?
« Reply #2 on: October 10, 2011, 08:08:14 am »
Im wondering how does it works Ive been reading about network packet http://en.wikipedia.org/wiki/Network_packet so the attacker sends a packet with the exploit the exploit would be data with the remote access request hidden? thats my question
« Last Edit: October 10, 2011, 08:08:49 am by gh0st »

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: how to exploiting port services ?
« Reply #3 on: October 10, 2011, 08:40:51 am »
Let's not say "exploit" too much... in this context it's a request with malicious payload.
I think I would go by determining what kind of data should I need to send and send a system command in the format. If the buffer is fixed length, then send more shit than it can accept and it will crash :D

dunno, it's 8.40AM, school after 10km ride by bike, brain is just booting up :D

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how to exploiting port services ?
« Reply #4 on: October 10, 2011, 08:44:53 am »
would I need to do reverse engieneer the ports?
@kulverstukas: topic name changed
« Last Edit: October 10, 2011, 08:53:47 am by gh0st »

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: how find 0 days in port services ?
« Reply #5 on: October 10, 2011, 09:35:18 am »
The topic name was fine, as it describes the topic discussed, finding 0days is completely different to what you write here :P
But yeah I think that you would need to reverse the ports to see what data they can accept and send, what format etc.
« Last Edit: October 10, 2011, 09:35:51 am by Kulverstukas »

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: how find 0 days in port services ?
« Reply #6 on: October 10, 2011, 05:21:51 pm »
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how find 0 days in port services ?
« Reply #7 on: October 11, 2011, 07:38:30 am »
whats a shellcode can someone give me an example its something that you execute and the attacker has remote access ? Ive never seen one
« Last Edit: October 11, 2011, 07:38:48 am by gh0st »

Offline ca0s

  • VIP
  • Sir
  • *
  • Posts: 432
  • Cookies: 53
    • View Profile
    • ka0labs #
Re: how find 0 days in port services ?
« Reply #8 on: October 11, 2011, 01:56:07 pm »
Come on gh0st. Read some tutorials. Start with Smashing the stack, as ande said. It explains it quite well.
I think you aren't understanding how this works. You don't find a bug in a port. You find a bug in a program which is listening in a port (tl;dr: a service).
It is not "a packet" with the exploit. This is not about networking.
Learn C. Learn what a buffer overflow is (going back to ande's text...).
And this is a shellcode: \x31\xc9\xf7\xe1\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xb0\x0b\xcd\x80
Read the fucking tut.

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how find 0 days in port services ?
« Reply #9 on: October 12, 2011, 05:20:17 am »
wait dude I got it
the payload has to be delivered to the victim computer by a port service which is exploited by a 0 day
now my question is the bufferoverflow enough to accomplish the attack? or the payload has to have a 0 day too?
btw now I underestand what is a bufferoverflow not coded it yet but I know the theory
http://metasploit.com/about/penetration-testing-basics/payload.jsp

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how find 0 days in port services ?
« Reply #10 on: October 16, 2011, 08:03:15 am »
guys can some1 give me an example about sending patckets with any language ? I dont get how to send the payload with the packet

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: how find 0 days in port services ?
« Reply #11 on: October 16, 2011, 08:48:29 am »
guys can some1 give me an example about sending patckets with any language ? I dont get how to send the payload with the packet
Uhh.. I wouldn't exactly consider this a packet. Your OP sent to TCP port 6821. From what I understand:

Quote
When handling a packet type the process trusts a remaining packet length value provided by the user and blindly copies user supplied data into a fixed-length buffer on the stack.
Somewhere in this protocol is length field which the program will accept as factual, and will copy that length of data(provided by you) into a fixed-size buffer... Leading to overflow.

Quote
Due to the small number of installations using this software the risk of potential exploitation has been determined to be very low and therefore this issue will not be addressed.
Out of curiosity do you actually have a target system?

To send data to a port look into "sockets". Available in most languages, easiest example is using netcat:

Code: [Select]
$ nc evilzone.org 80
GET / HTTP/1.1
Host: evilzone.org

<< Reply + HTML code of http://evilzone.org/ >>

Congrats you sent a packet... actually you sent several, not important. If you think to simply send your shellcode to the target system on that port, you're mistaken.

If you're sure about your packet thing, then look into "raw sockets". Available in fewer, nontheless alot, of languages. Raw sockets is kinda of a C thing though.

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: how find 0 days in port services ?
« Reply #12 on: October 17, 2011, 04:31:27 am »
@xzid, I think that its about raw packets Ive found a tool that does the sending http://nemesis.sourceforge.net/ +1 and have you ever found a 0 day vuln?

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: how find 0 days in port services ?
« Reply #13 on: October 17, 2011, 06:46:07 am »
Nothing I'd brag about.

I have my doubts about the raw packets, although holy crap does that nemesis thing you posted look awesome!!#! ARPspoofing, SYN flooding, etc.. ALL IN BASH!!!.. What I wish netcat could do. dsniff can go sniff itself. I'll be sure to check it out in more detail sometime.

Z3R0

  • Guest
Re: how find 0 days in port services ?
« Reply #14 on: October 27, 2011, 12:40:17 pm »
@gh0st watch all of these video tutorials that I have made. It will help you understand how exploits are developed.

To answer your question directly, refer to Part 3 of my exploit series. The topic covered in Part 3 is Fuzzing.
Code: [Select]
http://evilzone.org/video-tutorials/exploit-series-part-1-(intro)/
http://evilzone.org/video-tutorials/exploit-series-part-2-(1st-segment)/
http://evilzone.org/video-tutorials/exploit-series-part-2-(2nd-segment)/
http://evilzone.org/video-tutorials/exploit-series-part-3/
http://evilzone.org/video-tutorials/exploit-series-part-4/
http://evilzone.org/video-tutorials/exploit-series-part-5-(1st-segment)/
http://evilzone.org/video-tutorials/exploit-series-part-5/