Sawmill Discussion Forum
fbruchez
Member since Sep-24-03
5 posts |
Sep-24-03, 07:05 AM (PDT) |
|
"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 |
|
|
ferrar
Member since Sep-5-01
2799 posts |
Sep-25-03, 02:21 PM (PDT) |
 |
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) |
|
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 dont hesitate to contact me by e-mail for clarification. Thanks, F. Bruchez
|
|
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) |
|
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 |
|
|
|
 |
|
 |
|
 |
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 |
|
|
|
 |
|
 |
|
 |
|
 |
mlachniet
Member since Aug-3-05
2 posts |
Sep-29-05, 02:01 PM (PDT) |
 |
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 |
|
|
|
|