Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Nessus: users

get_rpc_port parameters

 

 

Nessus users RSS feed   Index | Next | Previous | View Threaded


gregomarco at gmail

Feb 8, 2008, 11:46 AM

Post #1 of 4 (243 views)
Permalink
get_rpc_port parameters

Hi all,
I just subscribed to the mailing list, and here you go with my first question:

I wonder how to get the function get_rpc_port works, it is defined in
the misc_function.inc library.
The syntax is supposed to get a program number and the protocol. What
does the parameter "program" is meant to be? I have the hunch it is
related to some kinda portmapping translation but I suppose there
should be a static mapping between a program number and its related
process' name. For example I'd like to issue the program number
concerning firefox in order to get the port where the process is
listening to.

thank you in advance

--
Marco
_______________________________________________
Nessus mailing list
Nessus [at] list
http://mail.nessus.org/mailman/listinfo/nessus


pavithra.chihan at gmail

Feb 9, 2008, 4:02 AM

Post #2 of 4 (230 views)
Permalink
Re: get_rpc_port parameters [In reply to]

Hi,
As given in NASL reference guide, get_rpc_port(program, protocol) calls the
portmapper and gets the port where the service specified by the parameters
is located. program is a RPC number and protocol may be IPPROTO_TCP or
IPPROTO_UDP. If the portmapper could not be reached or the service is
down, the function returns 0.

You can refer programs given below for the function usage.
bootparamd.nasl:port = get_rpc_port(program:RPC_PROG, protocol:IPPROTO_UDP);
cachefsd_overflow.nasl:port = get_rpc_port(program:RPC_PROG,
protocol:IPPROTO_UDP);
knfs_dos.nasl:port = get_rpc_port(program:100003, protocol:IPPROTO_UDP);
mountd_overflow.nasl:port = get_rpc_port(program:100005,
protocol:IPPROTO_UDP);
netinfo_passwd.nasl:function get_rpc_port(protocol)
netinfo_rpc.nasl:function get_rpc_port(protocol)
nfs_dotdot.nasl:port2 = get_rpc_port(program:100003, protocol:IPPROTO_UDP);
nfs_fsirand.nasl:port = get_rpc_port(program:100005, protocol:IPPROTO_TCP);
etc.

On Feb 9, 2008 1:16 AM, marco <gregomarco [at] gmail> wrote:

> Hi all,
> I just subscribed to the mailing list, and here you go with my first
> question:
>
> I wonder how to get the function get_rpc_port works, it is defined in
> the misc_function.inc library.
> The syntax is supposed to get a program number and the protocol. What
> does the parameter "program" is meant to be? I have the hunch it is
> related to some kinda portmapping translation but I suppose there
> should be a static mapping between a program number and its related
> process' name. For example I'd like to issue the program number
> concerning firefox in order to get the port where the process is
> listening to.
>
> thank you in advance
>
> --
> Marco
> _______________________________________________
> Nessus mailing list
> Nessus [at] list
> http://mail.nessus.org/mailman/listinfo/nessus
>



--
Thanks,
Pavithra.H
Research Analyst, ThirdBrigade Labs
Bangalore


pavithra.chihan at gmail

Feb 9, 2008, 8:39 AM

Post #3 of 4 (227 views)
Permalink
Re: get_rpc_port parameters [In reply to]

Got you!!
firefox_listening_port= get_rpc_port( ? , protocol:IPPROTO_UDP);
Where program is the fixed RPC number.
Here is the list of RPC program numbers used in NMAP.
ftp://ftp.tau.ac.il/pub/users/eilon/rpc/rpc

On Feb 9, 2008 7:22 PM, marco <gregomarco [at] gmail> wrote:

> 2008/2/9, Pavithra H <pavithra.chihan [at] gmail>:
> > Hi,
> > As given in NASL reference guide, get_rpc_port(program, protocol) calls
> the
> > portmapper and gets the port where the service specified by the
> parameters
> > is located. program is a RPC number and protocol may be IPPROTO_TCP or
> > IPPROTO_UDP. If the portmapper could not be reached or the service is
> > down, the function returns 0.
>
> This is clear to me, my doubt is about the RPC number itself. If I
> want to determinate which port an instance of firefox running on the
> scanned host, is listening to, how can i know which rpc number i must
> enclose as parameter?
>
> firefox_listening_port= get_rpc_port( ? , protocol:IPPROTO_UDP);
>
> Is there a fixed program number which is assigned by the portmapper to
> the each process?
>
> For example , the programs you kindly gave me aren't very clear:
>
> > bootparamd.nasl:port = get_rpc_port(program:RPC_PROG,
> protocol:IPPROTO_UDP);
> > cachefsd_overflow.nasl:port = get_rpc_port(program:RPC_PROG,
> > protocol:IPPROTO_UDP);
>
> In those two cases it seems RPC_PROG is a predetermined variable,
> maybe there's a particular function to get it?
>
> > knfs_dos.nasl:port = get_rpc_port(program:100003,
> protocol:IPPROTO_UDP);
> > mountd_overflow.nasl:port = get_rpc_port(program:100005,
> > protocol:IPPROTO_UDP);
> > nfs_dotdot.nasl:port2 = get_rpc_port(program:100003,
> protocol:IPPROTO_UDP);
> > nfs_fsirand.nasl:port = get_rpc_port(program:100005,
> protocol:IPPROTO_TCP);
>
> Here you assume to know the number as it's assigned statically...Which
> process the program number 100003 is referred to? Where did you get
> it?
>
> Maybe I am not just getting the point, hope you can enlighten somehow.
>
> Thank you in advance
>
> --
>
> Marco
>



--
Thanks,
Pavithra.H
Research Analyst, ThirdBrigade Labs
Bangalore


pavithra.chihan at gmail

Feb 10, 2008, 12:36 AM

Post #4 of 4 (232 views)
Permalink
Re: get_rpc_port parameters [In reply to]

The link is absolutely accessible to me!! Anyway I have attached the file
for your reference.

On Feb 9, 2008 11:21 PM, marco <gregomarco [at] gmail> wrote:

> 2008/2/9, Pavithra H <pavithra.chihan [at] gmail>:
> > Got you!!
> > firefox_listening_port= get_rpc_port( ? , protocol:IPPROTO_UDP);
> > Where program is the fixed RPC number.
> > Here is the list of RPC program numbers used in NMAP.
> > ftp://ftp.tau.ac.il/pub/users/eilon/rpc/rpc
>
> Thank you, but the link you gave me isn't reachable..
>
> --
> Marco
>



--
Thanks,
Pavithra.H
Research Analyst, ThirdBrigade Labs
Bangalore
Attachments: rpc.txt (16.7 KB)

Nessus users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.