09-24-2007 08:52 AM - edited 03-10-2019 03:48 AM
Hi,
I would like to find out if it is possible to retrieve an active IPS signature policy from the device? I would like to obtain a complete policy currently running on the sensor not via CLI.
P.S. I was under the assumption that the sensor will store its policy in XML format on the file system.
Thanks in advance!
09-24-2007 09:42 AM
Yes, but you have to merge the default policy XML with the instance policy XML(you may also have to uncompress the files)
You can use the service account and scp. The relevant files are:
policy name = sig0
/usr/cids/idsRoot/etc/config/signatureDefinition/default.xml
/usr/cids/idsRoot/etc/config/signatureDefinition/instances/sig0.xml
You can also fetch them via HTTP(s), but you still have to merge them to get a complete configuration. If you want the POST examples on how to do this, let me know.
09-24-2007 11:11 AM
the POST example would be helpful. (A GET would be best.)
Also, is there an xsd/dtd for this xml?
thanks in advance for the help.
09-24-2007 11:20 AM
I don't believe you can use a GET, but not sure. If you find a way to do this using GET or without having to merge, I'd love to know. Anyway, here is the POST to get sig0:
POST https://192.168.0.1:443/cgi-bin/transaction-server?command=getConfigDelta HTTP/1.1
Accept: text/xml
Content-type: xml/txt
Accept-Charset: iso-8859-1,*,utf-8
User-Agent: CIDS Client/4.0
Host: 192.168.0.1
Pragma: no-cache
Cache-Control: no-cache
Proxy-Connection: keep-alive
Content-Length: 281
Cookie: userToken=6ae4bce4e291a20ecc8676bc071e507c;dummy
If memory serves, you can add credentials to the request URL and then not have to worry about messing about with cookies.
I've also attached a curl sample. It's for a different function, but I think you get the drift.
09-24-2007 11:22 AM
curl example.
09-24-2007 11:24 AM
09-24-2007 12:29 PM
Sorry, a side question:
Could you also tell me if a license status (expiration date) could be retrieved or obtained as a file or query from the IPS sensor?
Thanks for all your help!
09-24-2007 12:45 PM
From the CLI service account...not sure.
POST https://192.168.0.1:443/cgi-bin/transaction-server?command=getVersion HTTP/1.1
Accept: text/xml
Content-type: xml/txt
Accept-Charset: iso-8859-1,*,utf-8
User-Agent: CIDS Client/4.0
Host: 192.168.0.1
Pragma: no-cache
Cache-Control: no-cache
Proxy-Connection: keep-alive
Content-Length: 165
Cookie: userToken=b073d751b70c5c9d0e311baf11f9239a;dummy
09-24-2007 12:56 PM
I get an error from a CIDS v6.x when issuing /cgi-bin/transaction-server?command=getVersion
09-24-2007 01:02 PM
I answered my own question.
For future references, the license details are stored under
/usr/cids/idsRoot/shared/ips.lic
09-24-2007 01:09 PM
good to know.
10-02-2007 07:33 AM
You've mentioned in your previous post that policy sig0 could be retrieved via HTTP post method or scp a copy of the individual files (default.xml).
I am able to pull instance policy XML by referencing getConfigDelta from the transaction server.
Could you provide an example on how would one go about fetching default policy from the sensor via HTTP post or other methods?
Looking at the default.xml file, it appears to be encrypted or compressed?
Thanks in advance,
Michael
10-04-2007 06:10 AM
it is compressed. you can get it via scp here:
/usr/cids/idsRoot/etc/config/signatureDefinition/default.xml
and via an HTTP POST:
POST https://192.168.1.1:443/cgi-bin/transaction-server?command=getDefaultConfig HTTP/1.1
Accept: text/xml
Content-type: xml/txt
Accept-Charset: iso-8859-1,*,utf-8
User-Agent: CIDS Client/4.0
Host: 192.168.1.1
Pragma: no-cache
Cache-Control: no-cache
Proxy-Connection: keep-alive
Content-Length: 252
Cookie: userToken=zzz;dummy
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide