Convincing AntiVirsus, im not a virus

Started by
55 comments, last by dsm1891 8 years, 7 months ago

"Output//Merged.json"

Where is this file being written?

I don't recall how windows defines the working directory, but isn't this trying to write to the C:\Program Files\<AppName>\Output directory?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement

"Output//Merged.json"

Where is this file being written?

I don't recall how windows defines the working directory, but isn't this trying to write to the C:\Program Files\<AppName>\Output directory?

It is on instillation, but even in debug it writes to my documents. As per previous posts, I have tried writing to the users documents, tmp directory and desktop. All yield no results.

I think it is ridiculous to expect a small developer who wishes to release some software to pay to sign the code if it outputs something.

Mobile Developer at PawPrint Games ltd.

(Not "mobile" as in I move around a lot, but as in phones, mobile phone developer)

(Although I am mobile. no, not as in a babies mobile, I move from place to place)

(Not "place" as in fish, but location.)

Sooo, if I use Visual studio 2008, I can write to files, But if I use Visual Studio 2013 (CE) I have to disable the antivirus??

Mobile Developer at PawPrint Games ltd.

(Not "mobile" as in I move around a lot, but as in phones, mobile phone developer)

(Although I am mobile. no, not as in a babies mobile, I move from place to place)

(Not "place" as in fish, but location.)

keep digging, it's got to be something about your setup:

OS

compiler

a library, framework, or engine you're using

file permissions

weird antivirus settings

directory structure

something...

try even simpler tests. just open a text file and write an int and close it. then, one step at a time - work your way back up to turning the json code back on. when you find that point where adding the next step blows up, it may give you a clue as to the cause of the overall problem.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

There is the point where it gets futile to try to appease the antivirus with broken heuristics.

Finding a competing antivirus, which does not needlessly cry wolf when doing harmless things, will most likely save you time in the long run.

It is on instillation, but even in debug it writes to my documents. As per previous posts, I have tried writing to the users documents, tmp directory and desktop. All yield no results.

I think it is ridiculous to expect a small developer who wishes to release some software to pay to sign the code if it outputs something.

I don't use Avast, but I do use MSSE pre-installed on Win8/Win10, and manually installed on Win7, and my much larger, more complex, more suspicious and entirely unsigned executable doesn't get flagged, and it's writing and reading all kinds of files to a variety of locations. Spybot S&D doesn't flag it either.

Something your code is doing is wrong. I'm thinking SwiftCoder and Nypren are on the right track:

- Where you are outputting to (better not be a protected location)

- How you are outputting (the double forward slashes should be collapsed, but maybe it's being interpreted as a secret unnamed directory?)

And I'd also add:

- What you are outputting

Try outputting something entirely different, like "This is a test" without JSON or anything. If your program doesn't get flagged, it may mean that your output file looks suspiciously similar to a file that a known virus outputs, or something like that. Are your antivirus signatures up to date with your antivirus programs?

Also, just for kicks, try changing the name of your titlebar, executable name, and WNDCLASSEX classname. It's unlikely, but maybe you accidentally match a blacklist?

[Edit:] You're saying, the antivirus is blocking the file getting created, but not your entire program? Then double-check your file output location, permissions, and etc... It's quite possible the file isn't getting written to where you think it is.

There is the point where it gets futile to try to appease the antivirus with broken heuristics.

Finding a competing antivirus, which does not needlessly cry wolf when doing harmless things, will most likely save you time in the long run.

He's trying to release his app, telling every customer to swap their antivirus program isn't an option.

Don't use shitty anti viruses.

Well, you cannot even disable antivirus under modern versions of Windows, and if you kill it with the task manager, it shuts down the computer... so... gotta find a way to live with them.

That's funny, mine turns itself off all the time! I have to jump through a few hoops to get it to stay on. (Windows thinks Spybot is an anti-virus, and ""helpfully"" disables the built in MSSE/WindowsDefender, when I want them both on - so I have to tell Spybot not to register itself with Window's security panel).

Something your code is doing is wrong. I'm thinking SwiftCoder and Nypren are on the right track:
- Where you are outputting to (better not be a protected location)


Desktop, my documents temp dir with absolute path does not work

Project file with out (as per previous post but with backslashs)

- How you are outputting (the double forward slashes should be collapsed, but maybe it's being interpreted as a secret unnamed directory?)


As above, I tested a blank project, with various methods of outputting to. Text files inside the main function. Nada

And I'd also add:
- What you are outputting

Try outputting something entirely different, like "This is a test" without JSON or anything. If your program doesn't get flagged, it may mean that your output file looks suspiciously similar to a file that a known virus outputs, or something like that. Are your antivirus signatures up to date with your antivirus programs?


[Edit:] You're saying, the antivirus is blocking the file getting created, but not your entire program? Then double-check your file output location, permissions, and etc... It's quite possible the file isn't getting written to where you think it is.


Non of the outputed files appear anywhere.


Again my program works when compiled from vs08

Mobile Developer at PawPrint Games ltd.

(Not "mobile" as in I move around a lot, but as in phones, mobile phone developer)

(Although I am mobile. no, not as in a babies mobile, I move from place to place)

(Not "place" as in fish, but location.)

Why are you writing textual (JSON) data with the std::ofstream::binary flag set? That's probably incorrect to start with (newlines won't be translated), and could potentially also be suspicious to your anti-virus.

I'd also try using the C FILE* APIs (fopen, fwrite, fclose), instead of C++ streams, and see if that makes any difference.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement