flat assembler
Message board for the users of flat assembler.

Index > Windows > Simple console program not working with AVG

Author
Thread Post new topic Reply to topic
DergMoney



Joined: 29 Apr 2015
Posts: 34
DergMoney
Hello,

The following code prints Hello World then crashes and I can't see why

Code:
format PE64 console 
entry start 

include '%fasminc%\win64ax.inc' 

;************************************************************************************************** 
section '.text' code readable executable 

    start: 
        cinvoke printf, fmtStr, myStr
        invoke  ExitProcess, 00

;************************************************************************************************** 
section '.data' data readable writeable 

fmtStr      db "%s", 00
myStr         db "Hello World", 00

;************************************************************************************************** 
section '.idata' import data readable writeable 


library     kernel32, 'kernel32.dll',\
             msvcrt, 'msvcrt.dll'

    include '%fasminc%\api\Kernel32.inc' 

    import  msvcrt,\ 
        printf, 'printf'
    


winDbg64 gives the following error

Code:
00000000`00401028 ff153a200000    call    qword ptr [image00000000_00400000+0x3068 (00000000`00403068)] ds:00000000`00403068={ntdll!RtlExitUserProcess (00000000`770937f0)}
0:000> p
(11e0.688): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files (x86)\AVG\AVG2015\avghooka.dll
    



Does this mean that AVG is somehow interferring?

Thank you[/b]
Post 29 Apr 2015, 09:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
I ran your code on a Win7 box here that doesn't have any AV and it printed the expected text without any issues.

I'd suggest you delete your AV and don't bother installing a replacement. They cause only trouble and protect you from nothing of consequence.
Post 29 Apr 2015, 09:14
View user's profile Send private message Visit poster's website Reply with quote
DergMoney



Joined: 29 Apr 2015
Posts: 34
DergMoney
Thanks for the fast reply revolution. AVG was the problem.

I've never had any issues with it previously but there ya go.

If anyone reading this is concerned about running windows without antivirus, I had no problems with the code above after installing Avast
Post 29 Apr 2015, 09:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
DergMoney wrote:
AVG was the problem.
<...>
I had no problems with the code above after installing Avast
Hehe, out of the frying pan and into the fire.

You've had no problems ... yet. Razz
Post 29 Apr 2015, 10:04
View user's profile Send private message Visit poster's website Reply with quote
DergMoney



Joined: 29 Apr 2015
Posts: 34
DergMoney
I know, I know, lol
Post 29 Apr 2015, 10:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.