How do I find a user's last known IP Address if they've never posted to the site?

In the Verint reporting for February 2023, we had a user that had a view count of over 3,000,000 associated with them. This looks like the user that registered onto the site was using it to scrape the website.

This user has not posted anything to the site. They have only registered (2 years ago) and recently used the account to potentially scrape the site.

Disapproving their account is only a small step that can be taken, but ideally it needs to be an IP ban.

As an administrator with access to the admin' section of the site, and potentially using velocity script in a sandbox, how do I find out the user's IP address so that I can add them to the banned IP address list?



Amended date of activity.
[edited by: Christopher G. Stanton at 2:34 PM (GMT 0) on Mon, Apr 3 2023]
Parents Reply
  • If you can identify unique user agent data or a more recent IP, you may be able to find related requests in web server logs.

    As a site administrator that's not something I have direct access to unfortunately, which's why I am looking for logging inside the site itself.

    It would make more sense to me if the site kept a record of "last known login/registration IP address" against the user profile that administrators could view, and that this kept separately a record of last known impersonated user IP address too. I'm surprised this isn't the case and it's only in an audit log which expires.

    I agree with   that not having this data readily available can be problematic (and yes, I've voted on the idea linked in this thread). However, I was thinking about how this could be worked around, so I wanted to ask a general question about this for someone who's more familiar with development than myself.

    It seems possible that one could use the List User Presence REST Endpoint to grab the id/username and location of a member and save that in the user's extended attributes, an external db, or somewhere else. This could also, in theory, show you either the running list of all IPs per user or just their last-known. This wouldn't help get the historical data that Christopher is looking for, but could be a viable Automation(?) that could run on User.AfterAuthenticate moving forward to prevent this situation in the future. 

    Would/could this work? Any flaws in this (other than the actual development)?

Children
  • Would/could this work? Any flaws in this (other than the actual development)?

    If you're doing any kind of checks on the user for their IP address, you also need to check if that user is being impersonated because that can affect any code which is polling, retrieving or pulling their IP address. You would either want to store that separately or not at all after User.AfterAuthenticate.

    Our development team is attempting to use core_v2_authentication.IsImpersonated() to check for this but have found that it returns false even if the account is being impersonated (aka it's not quite working), so it cannot be relied upon at present, it also claims you're impersonating an account even if it's your own account (this has been raised with Verint support).