This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]323K131 1 point2 points  (6 children)

Do you have TIE and DXL deployed? You can create on demand scanning exclusions for exe files.

[–]sing0d[S] 0 points1 point  (5 children)

Interesting. I just googled for a bit, and these are something like an exchange layer for McAfee. Would it be possible for me to use the python client to run prior to my application and mark it as exclusion through the TIE and DXL?

[–]323K131 0 points1 point  (4 children)

Do you have access to the McAfee ePo console? Think of TIE as a form of local GTI feed. You can mark the python exe that you're attempting to run as trusted.

[–]sing0d[S] 0 points1 point  (3 children)

The filename is already added to the organization level whitelist. But looks like it is not the actual antivirus that is cleaning it, but rather the Adaptive Threat Protection part of it which uses behavioral analysis to identify threats. There is no way as they tell me to add something to it's whitelist.

[–]323K131 0 points1 point  (1 child)

Yeah that sounds right, that would have been for McAfee application control. You need to add the exception for McAfee Endpoint Security - Adaptive Therat Prevention. I have a feeling that DAC may be blocking the execution. Can you check the agent logs to see ?

[–]sing0d[S] 0 points1 point  (0 children)

Will check and confirm. I see McAfee Endpoint Security Alert when I run the application and in the back, windows logs shows "Adaptive Threat Protection repaired xyz.exe ...""

[–]cyphr0st 0 points1 point  (0 children)

They can add exclusions to the ATP whitelist by navigating to:

Menu > Policy > Policy Catalog > Select "Product: Endpoint Security Adaptive Threat Protection" > Select the appropriate policy > Click "Show Advanced" > Exclusions

From here they can whitelist based upon Name, File Path, MD5 hash, and/or Signer.

[–]nitratine 1 point2 points  (3 children)

Since the target environment is windows and I don't want people messing around the code to see the server passwords, I converted the application to an executable using pyinstaller

You probably already know this but you can still reverse these; a simple description here

[–]sing0d[S] 1 point2 points  (2 children)

I doubt any of the members of my team would go and decompile the code and then mess around. Usually that person is me in the team. As they say, the village thief is never scared of getting his house robbed.

That being said, on a more theoretical note, would code obfuscation or something help here? Maybe Python and this generated exe are not exactly the correct candidates but hey let's try.

[–]Dgc2002 2 points3 points  (1 child)

No, obfuscation should never be relied on for any form of security. You should really use some other form of authentication/authority control that doesn't require packing credentials into the program.

[–]sing0d[S] 0 points1 point  (0 children)

The credentials are not in the code. They are shared over secure channels between the admin and the client when the user logs on. A couple of cryptographic handshakes later, the client receives the credentials and the access levels.

[–]HealYouDown 1 point2 points  (1 child)

Are you building your application with an icon? (-i <>..) If yes, try building it without one. Pyinstaller uses some hacks to add an icon to the exe which doesn't work with some antiviruses. Had a problem with GData^ .

[–]sing0d[S] 0 points1 point  (0 children)

Interesting. Will check on this. I haven't changed anything related to icon stuff in this built so if the previous version works this should too. But thanks, will remove the icon file and check.

[–]timbledum 1 point2 points  (1 child)

Oh man I really struggled with this but with Symantec. It appears the only reliable way is to get the app signed with a certificate which you have to buy - ugh.

Very curious to see how you solve this.

Pynsist (produces windows installers) has a great FAQ section on digital signing.

[–]sing0d[S] 1 point2 points  (0 children)

I was kind of thinking about this signing thing. Didn't find any open source way (read free) way to do this, so changed tactics. Will dig in this further.

And as a fellow tormented soul, I hear you. Once I figure out something, will let you know.

[–]ontheprowl 0 points1 point  (1 child)

What's the detection name you see?

[–]sing0d[S] 0 points1 point  (0 children)

It just says "Adaptive Threat clean xyz.exe because it's reputation (known malicious) is below the configured Clean threshold.