1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【c#】ウイルス検知されるコード備忘録(5個)

Last updated at Posted at 2025-09-08

Windowsディフェンダーくんのやっつけに悩んでいますか?参考程度にだめだった処理をメモしていこうと思います。

browserExecutableFolderっていう引数

明らかに危なそうなので、機械学習でアウト

生のバイト関連

ReadAllBytes

これは使うだけで1発KOです。

var encrypted = File.ReadAllBytes(path1);
var json = Encoding.UTF8.GetString(encrypted);

↑はReadAllText使いましょう。

 var json = File.ReadAllText(path1, Encoding.UTF8);

UTF8.GetBytes

↓賢い人代替処理教えて

var bytes = Encoding.UTF8.GetBytes(json);

WriteAllBytes

バイナリ関連なのでだめっぽいです。

File.WriteAllBytes(path, bytes);

↑はWriteAllText使いましょう。

File.WriteAllText(path, json, Encoding.UTF8);

c++

volatile

volatileにurl埋め込んで、それが使用されてなければ1発KOです。

傾向

AVはexe内の文字や、メモリの内容から見えるあぶなそうな文字や、処理パターンを見てる傾向が強そうな印象です。

雑談

winDefenderとの壮大な戦いはしていて面白いですが、自分の書いたコードをそのまま使わせてほしいものです

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?