I'm trying to work with data from Juniper's Steel-Belted Radius servers and am struggling with it. I'm not sure I'm approaching this properly, but would like to generate reports on successful authentications, failed authentications, types of users attempting these types of authentications, etc. Also to exclude some event "chunks" where the authentication is really something done by a load balancer to check if the node is alive rather than a real person.
The approach I assumed was the right one was to try to use the "transaction" command to build transactions, then pare off each authentication attempt's info and filter from there. Aside from dealing with the slowness of the transaction command (there's lots of events), I'm finding that I cannot get Splunk to correctly identify a transaction.
Here's a sample of what an actual transaction might look like with elements randomized for safety. Note that A lot of the stuff in the middle could vary depending on the authentication type, but I'm trying to focus on this one common case first.
08/23/2011 16:01:58 (74c)-----------------------------------------------------------
08/23/2011 16:01:58 (74c)Authentication Request
08/23/2011 16:01:58 (74c)Received from: ip=1.2.3.4 port=12345
08/23/2011 16:01:58 (74c)
08/23/2011 16:01:58 (74c)Raw Packet :
08/23/2011 16:01:58 (74c)000: 0136004b 1f9da8d9 7ad4b701 8bf22849 |.6.K....z.....(I|
08/23/2011 16:01:58 (74c)010: 6a7d6e13 010d6466 776c627a 2d757365 |j}n...sanlbz-use|
08/23/2011 16:01:58 (74c)020: 720212dc 3af804d2 f1ac1f8f 90bfab2d |r...:..........-|
08/23/2011 16:01:58 (74c)030: f4b9f604 06c02e23 2b201264 66776c62 |.......#+ .sanlb|
08/23/2011 16:01:58 (74c)040: 31612e70 6273672e 707674 |1a.sal.pvt |
08/23/2011 16:01:58 (74c)
08/23/2011 16:01:58 (74c)-----------------------------------------------------------
08/23/2011 16:01:58 F:\build\zMhtHo68zI\SBR\xradius\radauthd.c radAuthHandleRequest() 3022 (92c)Entering
08/23/2011 16:01:58 (92c)Looking up shared secret
08/23/2011 16:01:58 (92c)Looking for RAS client 1.2.3.4 in DB
08/23/2011 16:01:58 (92c)Matched 1.2.3.4 to RAS client SANLBZ1C
08/23/2011 16:01:58 (92c)Parsing request
08/23/2011 16:01:58 (92c)Initializing cache entry
08/23/2011 16:01:58 (92c)Doing inventory check on request
08/23/2011 16:01:58 (92c)Getting info on requesting client
08/23/2011 16:01:58 (92c)NAS-IP-Address in request: 2.3.4.5
08/23/2011 16:01:58 (92c)Looking for RAS client 2.3.4.5 in DB
08/23/2011 16:01:58 (92c)NAS-ID in request: "sanlb1a.sal.pvt"
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)Authentication Request
08/23/2011 16:01:58 (92c)Received From: ip=1.2.3.4 port=12345
08/23/2011 16:01:58 (92c)Packet : Code = 0x1 ID = 0x36
08/23/2011 16:01:58 (92c)Client Name = SANLB1A.SAL.PVT Dictionary Name = Radius.dct
08/23/2011 16:01:58 (92c)Vector =
08/23/2011 16:01:58 (92c)000: 1f9da8d9 7ad4b701 8bf22849 6a7d6e13 |....z.....(Ij}n.|
08/23/2011 16:01:58 (92c)Parsed Packet =
08/23/2011 16:01:58 (92c)User-Name : String Value = sanlbz-user
08/23/2011 16:01:58 (92c)User-Password : Value =
08/23/2011 16:01:58 (92c)000: dc3af804 d2f1ac1f 8f90bfab 2df4b9f6 |.:..........-...|
08/23/2011 16:01:58 (92c)NAS-IP-Address : IPAddress = 2.3.4.5
08/23/2011 16:01:58 (92c)NAS-Identifier : String Value = sanlb1a.sal.pvt
08/23/2011 16:01:58 (92c)Funk-Source-IP-Address : IPAddress = 1.2.3.4
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)Determining if request is for a tunnel
08/23/2011 16:01:58 (92c)Determining if this radius should act as a proxy
08/23/2011 16:01:58 (92c)CreateRequestEx: using virtual realm RETRealm for authentication.
08/23/2011 16:01:58 (92c)Determining user class
08/23/2011 16:01:58 (92c)Authenticating user SANLBZ-USER with authentication method Native User
08/23/2011 16:01:58 (92c)Determined that SANLBZ-USER of class Native-User is the user
08/23/2011 16:01:58 (92c)Getting attribute info on requesting user
08/23/2011 16:01:58 (92c)Getting profile info for requesting user
08/23/2011 16:01:58 (92c)Merging saved attributes with user info
08/23/2011 16:01:58 (92c)Merging profile info with user info
08/23/2011 16:01:58 (92c)Comparing checklist items with user/profile items
08/23/2011 16:01:58 (92c)Appending echo values, if any
08/23/2011 16:01:58 (92c)User SANLBZ-USER being passed to attribute editing authentication methods
08/23/2011 16:01:58 (92c)Class subattribute: DistName : String Value = SANLBZ-USER
08/23/2011 16:01:58 (92c)Class subattribute: AuthType : String Value = 0
08/23/2011 16:01:58 (92c)Class subattribute: TransactionId : Value =
08/23/2011 16:01:58 (92c)000: 47c56dd3 cd1344ef 0000701a |G.m...D...p. |
08/23/2011 16:01:58 (92c)Class subattribute: VirtualRealm : String Value = RETRealm
08/23/2011 16:01:58 (92c)Sent accept response for user SANLBZ-USER to client SANLB1A.SAL.PVT
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)Authentication Response
08/23/2011 16:01:58 (92c)Packet : Code = 0x2 ID = 0x36
08/23/2011 16:01:58 (92c)Vector =
08/23/2011 16:01:58 (92c)000: 50f735a0 f2f07130 76f872ae 55c95701 |P.5...q0v.r.U.W.|
08/23/2011 16:01:58 (92c)Class : Value =
08/23/2011 16:01:58 (92c)000: 53425232 434ca3f1 addd9eb4 a6c4f7c0 |SBR2CL..........|
08/23/2011 16:01:58 (92c)010: 11803701 80028198 8002800d 81a291ca |..7.............|
08/23/2011 16:01:58 (92c)020: f4e289b4 adaad4e8 d5900880 0a81a794 |................|
08/23/2011 16:01:58 (92c)030: 89c59395 c2ecb6c0 12800e81 a3f1addd |................|
08/23/2011 16:01:58 (92c)040: 9eb4a6c4 f7c08087 80e8 |.......... |
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)Authentication Response
08/23/2011 16:01:58 (92c)Sent to: ip=1.2.3.4 port=12345
08/23/2011 16:01:58 (92c)
08/23/2011 16:01:58 (92c)Raw Packet :
08/23/2011 16:01:58 (92c)000: 02360060 50f735a0 f2f07130 76f872ae |.6.`P.5...q0v.r.|
08/23/2011 16:01:58 (92c)010: 55c95701 194c5342 5232434c a3f1addd |U.W..LSBR2CL....|
08/23/2011 16:01:58 (92c)020: 9eb4a6c4 f7c01180 37018002 81988002 |........7.......|
08/23/2011 16:01:58 (92c)030: 800d81a2 91caf4e2 89b4adaa d4e8d590 |................|
08/23/2011 16:01:58 (92c)040: 08800a81 a79489c5 9395c2ec b6c01280 |................|
08/23/2011 16:01:58 (92c)050: 0e81a3f1 addd9eb4 a6c4f7c0 808780e8 |................|
08/23/2011 16:01:58 (92c)
08/23/2011 16:01:58 (92c)-----------------------------------------------------------
08/23/2011 16:01:58 (92c)Packet containing 96 bytes successfully sent
08/23/2011 16:01:58 F:\build\zMhtHo68zI\SBR\xradius\radauthd.c radAuthHandleRequest() 3777 (92c)Exiting
My most recent attempts have been with
* | transaction maxspan=15s keepevicted=t host endswith="Packet containing"
The 15 seconds are arbitrary (I'm not certain how long an auth attempt might be, but I believe it's usually pretty quick) and I know that an auth attempt usually will not span multiple radius hosts. Identifying the transaction using the lines of dashes isn't really correct as those lines exist within a real transaction. When I run the command above, it identifies the section starting with the "(92c)" lines ending with the "Packet containing" line as a transaction, but then orphans the first 13 lines instead of including it in the transaction. I only see those because of the "keepevicted" parameter. Note that the line line that precedes the first event listed here is also a "Packet containing ..." line.
That number right after the date is called the LogThreadID, but it's not particularly useful here as from what I can see it's reused for multiple transactions (i.e. not unique per transaction) and from the example above, there are 2 different LogThreadIDs in just this one authentication attempt.
While I thought doing a transaction based solely on time might work better, I can't really be certain those parameters ("maxspan=1s"?) would really be correct all the time. Maybe a barrage of requests would come in all at once or maybe an auth session could take 2 seconds.
So is my approach here right given the quite unstructured format of this data? Any suggestions about how I might want to handle this differently?
Thanks
... View more