Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

APTP modification

Hi,

As there is now way at this time (that I know of) to automatically insert a list of IP's for the UTM to block, I am trying to leverage the behavior of the APTP functionality to be able to bulk/automatically insert IP numbers for blocking.

Currently I have a setup that can upload my own threatdata file to the UTM and it blocks the IP's in the file, however I do not fully understand the mechanism the UTM uses to reaload the data from the file, sometimes it takes quite a while for the changes to be applied.

I would like to be able to upload a modified threatdata file to the UTM and then tell the UTM to read the file so it blocks the IPs immediately.

I have read here that the Sophos staff recommends against this solution on the grounds that the APTP updates from Sophos are frequent (it will overwrite my threatdata file) and that maybe down the line the threatdata file would be encrypted.

My hope is to work around the first caveat by having the APTP update set to manual and only work with my file and the second has not happened yet so...

Is there anyone on the forum that has tried the same and would be willing to share your findings? Any insight into the APTP mechanics would be appreciated (file structure,cron entries etc) .

Thanks in advance!
/Patrik K


This thread was automatically locked due to age.
  • If this is a system under a support this should probably be approached in a less support voiding way.

    It is usually helpful to share what you know and link to the posts/threads you are referencing.

    This is far less tested than my usual posts, so proceed with caution in a test environment.

    Update threat data, from /var/pattern/aptp/threatmap.ph, perhaps?
    /usr/local/bin/patterndist aptp


    Disable aptp in up2date, perhaps?
    Edit the status value for the aptp section of /var/up2date/up2date.conf
    [aptp]
    status      = 0
    description = APTP Pattern Up2Date
  • Thank you for taking the time to reply teched.

    I'm using a lab environment to test this out and I am fully aware that it is not an officially supported modification.

    The post I was referring to was this one:
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/81/t/65205 

    After searching the net I found out that it is possible to change the threatdata file and have the system read the IP numbers from it and block them, however it is not as predictable as I would like. Sometimes it only blocks the first IP in the list and sometimes it can take a while to apply changes after a new file is uploaded.

    The threatdata file syntax is (as far as i know):
    comma separated with 4 fields and newline for each entry:
    URL/IP , path , threatdescription , sophosthreatID

    URL/IP -> can be either IP number or FQDN  (must be present)
    path -> URI segment of threat (can be empty)
    threatdescription ->  always "C2/Generic-A"? (maybe just descriptive?)
    sophosthreatID -> must be 10 digits? duplicates allowed.

    Since I'm not sure of the exact syntax that is expected in the APTP threatdata file a lot of the "unpredictability" I see when updating the file might be because I insert values that are out of bounds or otherwise illegal. 

    (If anyone has knowledge of the correct syntax of the threatdata file, the information would be much appreciated.)

    I have seen the up2date.conf file but I am not sure if the actual retrieval of new data from the threatdata file is linked to the up2date timer (I currently have this set to the min value of 15min.)  My experience has been that if I set update to manual my new threatdata file is never processed.

    I am under the impression that the base data was from the threatdata file, I do not know the function of threatdata.json and threatmap.ph, I assume they are generated from the threatdata file when it is processed.

    Thank you for pointing me to the patterndist script I will examine it and try to figure out exactly what it does [:)]


    Thanks
    /P
    (sorry for my English)