cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement Device ID+ with BIG-IP ASM/AWAF

Mohanad
Cirrostratus
Cirrostratus

Hello Everyone,

 

I'm trying to test out Device ID+ with BIG-IP AWAF, I followed this: Click here for more information on comprehensive BIG-IP iApp deployment and configuration options.

 

i configured all required firewall rules to allow BIG-IP to connect to (us.gimp.zeronaught.com)

 

Note: i have ASM/AWAF lic only

0691T00000F8TVYQA3.png 

 

 

 

I tired to access the website many times to check if the BIGIP will inject the JS and get the Device ID, before i allow the BIGIP to connect to (us.gimp.zeronaught.com) the script was failing, now status code is 200

0691T00000F8TVLQA3.png 

 

 

 

This is ASM event log

 

0691T00000F8TVKQA3.png 

 

Still Device ID field is N/A, Device ID+ configuration should reflect to Device ID field??

 

0691T00000F8TVOQA3.png 

Anyone can help what's wrong?

I tired Online verification tool from F5

 

0691T00000F8Tq7QAF.pngThanks,

Mohanad

6 REPLIES 6

Hi ,

 

Device ID and Device ID+ are two different features. By enabling Device ID+ you will not get any data into the Device ID field. Take a look here: https://devcentral.f5.com/s/feed/0D51T00008nulFuSAI

I explained the differences between the two.

 

KR

Daniel

Hello Daniel,

 

Thank for your reply, i read your explanation while im learning about Device ID+ and it's really good...

 

what i need for next step, to match this data diA & diB and do something with it, i want to use it for brute force protection, Bot defense Dos etc.. but i will keep search

Mohanad
Cirrostratus
Cirrostratus

i'm able to log diA & diB using irule provided by Anulfo Hernandez

0691T00000F8YOXQA3.png 

when HTTP_REQUEST { if [HTTP::cookie exists _imp_apg_r_] { set deviceid [URI::decode [HTTP::cookie _imp_apg_r_]] log local0. "URL Decoded cookie is $deviceid" set deviceida [lindex [regexp -inline -- (?:"diA":")(.*?)(?:") $deviceid] 1] log local0. "diA = $deviceida" set deviceidb [lindex [regexp -inline -- (?:"diB":")(.*?)(?:") $deviceid] 1] log local0. "diB = $deviceidb" log local0. "IP is [IP::client_addr]" log local0. "Path os [HTTP::path]" } else { log local0. "No cookie" } }

now i want to use it with bot defense how to match on diA?

when BOTDEFENSE_ACTION { if {[$diA equals {"[AYrQyWEAAAAACxF5RBPJyPdDICteKxbw"}]} { set res [BOTDEFENSE::action block] log local0. "Mohanad is Blocked" } }

0691T00000F8YTNQA3.png 

 

How do you want to identify a bot by only looking at diA? You would need to have a list of known good identifiers (maybe all devices belonging to your company?) and then make an iRule action based on this list.

Or you could store Device ID+ identifiers and build a custom solution that would, for example, rate limit this device, or block the device if it appears from different geolocations within unreasonable time (now in USA, 10 seconds later in Sweden or so).

 

What I want to say is, that the device identifier from DID+ does not mean anything to Bot Defense. You will have to build a custom solution and "business logic" around it.

Thank you Daniel, You are absolutely right about build a custom solution and "business logic", i realized that DID+ not fully integrated with F5 BIGIP, all i want to test out the feature with ASM like a PoC.

 

 

You can follow along this video of Matthieu Dierick from F5:

https://www.youtube.com/watch?v=PVYwh76nGVE&t=10s

In his Github Repo (https://github.com/MattDierick/DeviceID-api-server) you can take a closer look at his solution.

However he is using APM, not AdvWAF.

 

He build an API to store information about the user and the diA and diB. You can either use his API or build a similiar one with https://loopback.io/.

The big missing piece is how to store the diA and diB in this API with AdvWAF instead of APM. Be creative 🙂