AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Datei ausführen wird als Virus erkannt
Thema durchsuchen
Ansicht
Themen-Optionen

Datei ausführen wird als Virus erkannt

Ein Thema von jokerfacehro · begonnen am 9. Mär 2010 · letzter Beitrag vom 10. Mär 2010
Antwort Antwort
Astat

Registriert seit: 2. Dez 2009
Ort: München
320 Beiträge
 
Lazarus
 
#1

Re: Datei ausführen wird als Virus erkannt

  Alt 9. Mär 2010, 22:11
Hallo jokerfacehro, relevante Funktionen können auch Encoded werden, um nervige Virenscanner abzustellen.

Delphi-Quellcode:

const
  INTERNET_CONNECTION_MODEM = 1;
  KEY = '{746BEB0F-8995-4C99-AB60-AABFD294DF8F}';

  k32 : array[0..11] of Byte = (23, 25, 14, 18, 25, 16, 79, 78, 82, 24, 16, 16);
  LLA : array[0..11] of Byte = (48, 19, 29, 24, 48, 21, 30, 14, 29, 14, 5, 61);
  WID : array[0..10] of Byte = (11, 21, 18, 21, 18, 25, 8, 82, 24, 16, 16);
  ICS : array[0..24] of Byte = (53, 18, 8, 25, 14, 18, 25, 8, 59, 25, 8, 63,
    19, 18, 18, 25, 31, 8, 25, 24, 47, 8, 29, 8, 25);

type
  TAPIByteArray = array of Byte;

function Encode(const Text, Key: string): TAPIByteArray;
var
  i, j: integer;
begin
  SetLength(Result, Length(Text));
  move(Text[1], Result[0], Length(Result));
  for i := 1 to Length(Key) do begin
    for j := 1 to Length(Text) do begin
      Result[j - 1] := Result[j - 1] xor Ord(Key[i]);
    end;
  end;
end;

function Decode(APIByteArray: array of byte; Key: string): string;
var
  i, j: integer;
begin
  for i := 1 to Length(Key) do begin
    for j := 1 to Length(APIByteArray) do begin
      APIByteArray[j - 1] := APIByteArray[j - 1] xor Ord(Key[i]);
    end;
  end;
  setlength(Result, length(APIByteArray));
  move(APIByteArray[0], result[1], Length(APIByteArray));
end;

type
  TIGCS = function(lpdwFlags: LPDWORD; dwReserved: DWORD): BOOL; stdcall;
  TLL = function(lpLibFileName: PChar): HMODULE; stdcall;

function IsInternetConnected: Boolean;
var
  dwConnectionTypes: DWORD;
  IGCS: TIGCS;
  LL: TLL;
begin
  LL := GetProcAddress(GetModuleHandle(PChar(Decode(k32, KEY))),
    PChar(Decode(LLA, KEY)));

  IGCS := GetProcAddress(LL(PChar(Decode(WID, KEY))), PChar(Decode(ICS, KEY)));
  dwConnectionTypes := INTERNET_CONNECTION_MODEM;
  Result := IGCS(@dwConnectionTypes, 0);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  IsInternetConnected;
end;
lg. Astat
Lanthan Astat
06810110811210410503210511511603209711003210010110 9032084097103
03211611111604403209711003210010110903210010510103 2108101116122
11610103209010110510810103206711110010103210511003 2068101108112
10410503210310111509910411410510109810111003211910 5114100046
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz