Welcome to Sawmill.Net
 
 

Sawmill Discussion Forum

Subject: "Strange behaviour when analysing Cisco Pix logs"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences Pre-Sales Topic #243
Reading Topic #243
fbruchez
Member since Sep-24-03
5 posts
Sep-24-03, 07:05 AM (PDT)
Click to send private message to fbruchez Click to add this user to your buddy list  
"Strange behaviour when analysing Cisco Pix logs"
 
   I am testing sawmill version 6.5.2 to analyse Cisco Pix Firewall logs (more than 2GB of log per day). I see something strange in the way you take in account the lines logged by the Pix and the result displayed in your statistics views.

The problem is regarding source and destination IPs:
When I analyse a "Teardown" line of the log Sawmill always take the first IP of the line, as the source IP. This is not always the case! It depends in which direction the session was established ("Built outbound" or "Built inbound" messages). Both lines are analysed separately, but for me they are linked (with the connection ID) and the complete information about the session is available only when the two lines are put together (combined). Cisco always writes the "Teardown" line with the low level interface first (not necessarily source IP) and then the high level (not necessarily destination IP), there is no information about the establishment direction of the session in this line (only the "Built" message has this).

Pix report an outgoing session (where source and destination are wrong):
%PIX-6-302013: Built outbound TCP connection 26332522 for outside:62.210.190.23/80 (62.210.190.23/80) to inside:155.105.58.53/1516 (155.105.58.53/1516)
…
%PIX-6-302014: Teardown TCP connection 26332522 for outside:62.210.190.23/80 to inside:155.105.58.53/1516 duration 0:00:01 bytes 2219 TCP FINs
Source = inside:155.105.58.53/1516
Destination = outside:62.210.190.23/80
You report the reverse !

Pix report an incoming session (where source and destination are right):
%PIX-6-302013: Built inbound TCP connection 26332591 for outside:64.68.82.50/42810 (64.68.82.50/42810) to public:155.105.6.32/80 (155.105.6.32/80)
…
%PIX-6-302014: Teardown TCP connection 26332591 for outside:64.68.82.50/42810 to public:155.105.6.32/80 duration 0:00:05 bytes 24300 TCP FINs
Source = outside:64.68.82.50/42810
Destination = public:155.105.6.32/80


Do you have a solution to this problem? Or is it possible to combine the two lines in the database (to complete the direction information or swap source destination IPs & ports).

Thanks in advance for your reply.
F. Bruchez

Note: as outgoing connections represent the majority of the traffic compare to incoming, I currently reverse you default behaviour source-destination to destination-source in the log parsing filters.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top

 
Conferences | Topics | Previous Topic | Next Topic
ferraradmin
Member since Sep-5-01
2799 posts
Sep-25-03, 02:21 PM (PDT)
Click to EMail ferrar Click to send private message to ferrar Click to view user profileClick to add this user to your buddy list  
1. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #0
 
How much I do hate PIX format.

So you're telling me that in the following line:

%PIX-6-302014: Teardown TCP connection 26332522 for outside:62.210.190.23/80 to inside:155.105.58.53/1516 duration 0:00:01 bytes 2219 TCP FINs

when the PIX says the connection is "X to Y" (which in my understanding of English means X is the source; e.g. if you cross the channel London to Paris, which is your destination? Can you really say that you're crossing the channel northbound London-to-Paris, and expect people to understand that because you specified the direction, that "to" should be ignored and that London should be assumed to be the destination? Argh!) they actually mean "Y to X"?! I.e. 62.210.190.23 is the source IP? And furthermore, you're saying that it's not even possible to know which one they really mean without looking at the earlier Built line? Please tell me that's now how they do it. It if is, I'm sure we'll find a way to handle this-- Sawmill does have a way of "keying" on a particular field (26332522 in this case) to carry information from one line to another, but PIX format is complex enough to parse already-- I hate to think that we're going to have to use keying too. Please verify that this is really what the PIX means when it logs; if it is, we'll change the plug-in to report it correctly.

-
Greg Ferrar, Sawmill Product Manager
support@sawmill.net


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
fbruchez
Member since Sep-24-03
5 posts
Oct-01-03, 04:39 AM (PDT)
Click to send private message to fbruchez Click to add this user to your buddy list  
2. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #1
 
   You are right about the literal meaning of "to". But the Cisco Pix world does not have the same way of thinking!

As far as I know since PixOS 6.2 (latest version is 6.3) the log format has changed drastically. Old message reporting direction of the session and consumed bytes "%PIX-6-30200<1|2|5|6>" has been replaced by respectively "%PIX-6-30201<3|4|5|6>" (the old messages are no more used).

More information available here: http://www.cisco.com/en/US/products/sw/secursw/ps2120/products_system_message_guides_list.html

About the source and destination problem, I did not found precise information within the Cisco web site (even logged-in). I make my own tests to analyse the Pix logs depending on the direction the session was established. What I saw is the following:

As Cisco Pix Firewall is based on the ASA (Adaptive Security Algorithm), and then all interfaces must have a security level (number between 0 and 100). The inside Interface has by default a security level of 100 and outside has 0. DMZs can have security level in between these two numbers. The ASA always look at the session with the security level in mind, that mean a session is inbound or outbound.
Outbound = Interface with higher security level go to lower
Inbound = Interface with lower security level go to higher
Now we can understand the Cisco "to", that always mean "lower security level interface" to "higher security level interface". This order never takes in account the direction of the session. Only the "Built" message has this information with inbound/outbound string.

Case a) session initiate from inside
The "built" message report outbound (destination-low to source-high) session and "outside:62.210.190.23/80 to inside:155.105.58.53/1516" mean inside is the source and outside is the destination.

Case b) session initiate from outside (155.105.6.32)
The "built" message report inbound (source-low to destination-high) session and "outside:64.68.82.50/42810 to public:155.105.6.32/80" mean outside is the source and public is the destination.

Note: In regard of the destination port it makes sense for a web access!

If you want to be absolutely sure on that, we (I) can forward this question to Cisco. I mean open a TAC case to obtain a Cisco clarification on this subject.


Your "keying" option will be certainly the only way to doing valid report (source/destination). You current report will be right only if you have "inbound" traffic (like for hosted services).

I hope I am clear enough, anyway don’t hesitate to contact me by e-mail for clarification.
Thanks, F. Bruchez


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
ferraradmin
Member since Sep-5-01
2799 posts
Oct-03-03, 10:10 AM (PDT)
Click to EMail ferrar Click to send private message to ferrar Click to view user profileClick to add this user to your buddy list  
3. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #2
 
Oh, that is so evil.

I wonder if we can convince Cisco to change their format to make it reasonable? If they can add something on each line to help the parser understand which is the source and which is the destination, that would be fine. Or if they could make it so "X to Y" always means X is source (e.g. change the order of their outbound connections). Could you open a TAC case not just to clarify this (though I'm sure you're right), but more importantly to try to convince them to change the way they've done this? Maybe I can convince them to switch their logging entirely to W3C or something-- they desperately need a consistent format that doesn't require 100 passes over it to get the information.

Lacking cooperation from Cisco, would it work if Sawmill just automatically flipped source and destination IPs and ports whenever it saw that the connection was "outbound" (using keying to determine that)? That could be done with a collection of Log Filters, at the end of parsing each line. Do you think that would solve the problem, or are there cases where the connection is "outbound" and "X to Y" still means that X is the source?

-
Greg Ferrar, Sawmill Product Manager
support@sawmill.net


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
fbruchez
Member since Sep-24-03
5 posts
Oct-06-03, 07:37 AM (PDT)
Click to send private message to fbruchez Click to add this user to your buddy list  
4. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #3
 
   I don't think we can make Cisco changing something in their Pix log format! Is it possible to explore, first, the keying option?

Will this keying option increase the database size and reduce drastically the speed of the log importation process? Because I have 2GB of Pix log a day, and Sawmill generate a large database and take a long time to process each logs.

Thanks
F. Bruchez


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
i21
Member since Mar-21-02
1629 posts
Oct-09-03, 02:00 AM (PDT)
Click to EMail i21 Click to view user profileClick to add this user to your buddy list  
5. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #4
 
Hi,

Keying will slow the processing slightly but I would not expect it to be dramatic. It should not affect the database size and it may even reduce the db size if there is less being parsed.

Graham
Technical Support

support@thesawmill.co.uk


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
ferraradmin
Member since Sep-5-01
2799 posts
Oct-16-03, 07:45 AM (PDT)
Click to EMail ferrar Click to send private message to ferrar Click to view user profileClick to add this user to your buddy list  
6. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #4
 
Okay, let's try this keying thing. Can you email me some log data (as an attachment), with at least one session that Sawmill currently counts incorrectly? I'll try to get the keying working so it switches those two IPs. If possible, please provide me with a specific example of a source IP which is reported as a destination IP in the log data you send. Thanks,

-
Greg Ferrar, Sawmill Product Manager
support@sawmill.net


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
zeeke
unregistered user
Oct-22-03, 06:59 AM (PDT)
 
7. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #6
 
   Just my opinion but you get a lot better logs out of the PIX if you don't use the build and teardown logs. Stop logging informational and change to notifications. Then log all your traffic by acl's, and you will get a lot better logs. Thats my two cents anyway, and I log over 10 gig a day on my pix's. Here is a small example, you can change them anyway you like with the different acl's. Here are a few I just pulled off. Notice the source and destination is very specific.

106023: Deny udp src inside:xx.xx.xx.xx/138 dst outside:206.120.18.3/138 by access-group "acl_in"
106011: Deny inbound (No xlate) icmp src inside:xx.xx.xx.xx dst inside:xx.xx.xx.xx (type 8, code 0)
106023: Deny udp src outside:152.163.159.221/9052 dst inside:xx.xx.xx.xx/6079 by access-group "acl_out"

Anyway hope that helps, I also would love to see some better pix reports too

Zeeke



  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
Menop
Member since Oct-15-03
7 posts
Nov-11-03, 12:26 PM (PDT)
Click to EMail Menop Click to send private message to Menop Click to add this user to your buddy list  
8. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #7
 
   Was this fixed with the current upgrade?


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
i21
Member since Mar-21-02
1629 posts
Nov-12-03, 02:09 AM (PDT)
Click to EMail i21 Click to view user profileClick to add this user to your buddy list  
9. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #8
 
Hi it doesn't show up in the history (http://www.sawmill.net/version_history.html) so I do not think so. I will find out what progress has been made.
--
Graham


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
Menop
Member since Oct-15-03
7 posts
Nov-13-03, 09:30 AM (PDT)
Click to EMail Menop Click to send private message to Menop Click to add this user to your buddy list  
10. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #9
 
   Thanks, I am currently trying to see if the results given by Sawmill off or not.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
mlachniet
Member since Aug-3-05
2 posts
Sep-29-05, 02:01 PM (PDT)
Click to EMail mlachniet Click to send private message to mlachniet Click to view user profileClick to add this user to your buddy list  
11. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #10
 
   Strangely enough, I was just looking at this (2005-09-29) and it seemed to me that in the current version the source and destination might actually be flipped? Am I confused?

For example,

in the Single Page Summary, some of the top *SOURCE* IP addresses are external DNS servers. That makes me think that they are in fact being read in reverse, or not tracking the stateful connections somehow. The only way the DNS servers would be among the top source IP's is if it was only counting responses, and not the initial request.

It seems to be the same thing for ports as well. Maybe I am somehow confused?

Thanks,
Mark Lachniet


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top
dgilmoreadmin
Member since Nov-18-04
873 posts
Sep-29-05, 02:55 PM (PDT)
Click to EMail dgilmore Click to send private message to dgilmore Click to view user profileClick to add this user to your buddy list Click to send message via AOL IM  
12. "RE: Strange behaviour when analysing Cisco Pix logs"
In response to message #11
 
What version of Sawmill are you running?

It's possible that the IPs are listed in reverse in the log data. I've seen that before a few times.

Might need to send in a sample and we can take a look at it.

David
Sawmill Product Support Team
support@flowerfire.com


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top

Conferences | Topics | Previous Topic | Next Topic

Home    Overview    Features    Samples    Testimonials     FAQ    Downloads    Ordering    Manual    Support

 

Copyright © 2005 by Flowerfire Privacy Policy