What of the three features listed above would you like to see most?
Scanner
 41%  [ 5 ]
Real Time Shields
 33%  [ 4 ]
RunProgram Hook
 25%  [ 3 ]
Total Votes : 12

_player1537 wrote:
And *only* the homescreen? Or will this still work for in programs?
It would work in programs perfectly well; the Doors CS runprog hook, for instance, is restricted to programs run directly from the homescreen.
New Progress Report

What's Done:

-Data
-Installer (waiting on mal hex search strings)
-Write Update Definitions routine.
-Get OS checksum routine (2 byte)

Left to Do:

-Get hex mal search strings
-Get program list generator routine
-Get hook installation routine
>Write main part of program
-Write Scanner
-Write Setting display and Settings change

> means currently underway.

Expecting sufficient progress tomorrow.
Good stuff, good luck. You could help me a lot in the mal hex department by finding programs that you consider "malware" of some sort so I can figure out what commonalities define a program as malware in your sight.
I'm with KermM, I don't quite see how you could identify a program a malicious...

Program list generator: There used to be an amazing tool to do this, unfortunately, I can never remember where it was. I just know it came with something to make TI Basic shells. If you'd like, I'll look for it in a few?

Hooks! I love love love hooks! I'll gladly help in that department when the time comes Smile

Quote:
-Write Setting display and Settings change

What are the settings for? Like flags, such as lowercase, or general program settings like turning on/off the hook?
@ Player--general settings. I'd need asm for flags.

@ Kerm, well, there's BRICK.8xp by Brandon W, containing both certificate editing, flash unlocking, boot code modifying, and OS invalidation. I'll look for more.

I consider a program to be malware if it does dangerous action like these. Like you said right at the start, were not going to be able to intercept every potential crash or freeze, but if we can prevent the more severe stuff, then we have a purpose. And remember, Kerm. If we just put those mal-codes in for now, then we find more, I just put them in a virus definitions update file and upload it. The program is designed to auto-update if it finds an update file. That's already done.

@Player and Kerm, the purpose of the parser hook is to do this.

Let's say arbitrary program prgmAAA is about to be run.

The hook intercepts it and reads through prgmAAA, looking for malcodes. If some are found, it says "Found issues:" It tells you what it found (unless thats too much work), then says do you want to trust or block. It needs to do this any time a program is run. And, would such a hook activate when a program is called from within another?

Also, I would, obviously, need a small routine to check for whether the hook is currently installed or not.


I'm done with what I can do without the routines. Everything else requires the routines present for testing purposes.
List of bad programs:

-BRICK.8xp

-the program to screw up the screen (makes it turn blue and burns it) forgot the name. I saw it once in the ticalc.org archives and i believe on brandonw's site.

-OFFBY1 prank (http://www.ticalc.org/archives/files/fileinfo/410/41073.html) there's another version in the omnimaga forums somewhere that i requested.


I'll update this as i find more.

Now Kerm, will your HOOK require a manual confirmation on these before it runs the BCALL or before it runs the PROGRAM?
Wait, I thought that your program is handling everything. All that I was going to make the hook do was invoke your program with the name of the program about to be run before running said program, to give your program the opportunity to check the program for possible malicious code, prompt the user to allow or block the program, and act accordingly.
Would that cause issues, I could do it, but it would be a little smoother if the Hook was in complete control at that point. I will test a little bit and let you know. It will require more complex Axe coding, though, as Axe's inData( command only supports searching for one byte in zero-terminated data.
ACagliano wrote:
Would that cause issues, I could do it, but it would be a little smoother if the Hook was in complete control at that point. I will test a little bit and let you know.
That would mean that the hook would have to be in charge of reading all programs being executed, looking for all the malicious code segments, and prompting the user as to whether to run or block the said program.
Indeed. I would think that would be smoother than transferring control to a program, would it not. If you would be willing to code that, as I know you are quite busy.

I will be playing around with this for the full system scanner inside the program, and once I get it working I'll bump this topic with whether I could do it hookwise as well.
It is possible for me to do it as that your hook transfers control to a program that I write. However, I would guess that, then, not only would the hook have to be installed, but the hook would then have to check for whether its needed program is installed and throw an error if it isn't. Couldn't that get messy? Correct me if I'm wrong.

Current progress is on rewriting the main menu...
ACagliano wrote:
It is possible for me to do it as that your hook transfers control to a program that I write. However, I would guess that, then, not only would the hook have to be installed, but the hook would then have to check for whether its needed program is installed and throw an error if it isn't. Couldn't that get messy? Correct me if I'm wrong.

Current progress is on rewriting the main menu...
I think 'messy' is a bit too strong of a word for it, but I get your point regardless. The problem though is that if I implement everything in the hook, then there's not much more for you to add. Smile Don't forget, the hook is going to have to be inline ASM inside your app.
Yes. I understand. But, I have other features I'm working on. And the hook will be a separate entity from the full system scanner, which I will be doing as soon as I have a routine for returning the program list.

Also, Kerm, another question. What would be required if I wanted the antivirus's installer to auto-create a DCS folder for itself call BLAST, and place itself in that folder? Edit: Forgot to add: It only does this if it finds DCS installed on calc.
ACagliano wrote:
Yes. I understand. But, I have other features I'm working on. And the hook will be a separate entity from the full system scanner, which I will be doing as soon as I have a routine for returning the program list.

Also, Kerm, another question. What would be required if I wanted the antivirus's installer to auto-create a DCS folder for itself call BLAST, and place itself in that folder? Edit: Forgot to add: It only does this if it finds DCS installed on calc.
All you'd need to do is a quick scan through the filesystem to find the highest folder ID, then create your folder (which is just a protect program). It's quite trivial. Programs are simply tagged as in a folder using their T2 byte.
How exactly would I scan for the files? And what data should I add to create the new folder structure? And then, how would I alter the byte? Where is it in relation to the start of the program?
ACagliano wrote:
How exactly would I scan for the files? And what data should I add to create the new folder structure? And then, how would I alter the byte? Where is it in relation to the start of the program?
You scan for the files in the VAT. To create the new folder, you create a protected program called %FLD[byte of folder number] with T2 byte 01 (putting it in the main folder) with eight bytes of contents, eg. "BLASTAV[null]".
So,


Code:
"prgm%FLD"->Str3AA
GetCalc(Str3AA,8)->K


Now I have a pointer to a program called "%FLD". Is % what makes it hidden? And how do I name the folder?

Then, I do


Code:
"BLAST5  "->Str3AB
Copy(Str3AB,K,8)


That copies the name BLAST5 to the program "%FLD", with 2 null chars, for the 8.

What about T2 byte 01. In Axe, the start of the data of program BLAST5 would be obtained by doing.


Code:
"prgmBLAST5"->Str3AC
GetCalc(Str3AC)->V


{V} is the start of the data.
{V-2}r is the two byte size of the file

Where is the T2 byte (if you know)?




Edit:

Here is some things of interest for the hex malcodes:


Code:
.db 0BBh,6Dh
call UnlockFlash
;Set up RAM
ld hl,appBackUpScreen
ld de,appBackUpScreen+1
ld (hl),0FFh
ld bc,767
ldir
ld hl,newCertStart
ld de,appBackUpScreen
ld bc,newCertEnd-newCertStart
ldir
bcall(8057h) ;_GetCertificateStart
call getCertPage
ld hl,4000h
bcall(_EraseFlash)
call getCertPage
ld hl,6000h
bcall(_EraseFlash)
;Write the new certificate
call getCertPage
ld hl,appBackUpScreen
ld de,6000h
ld bc,768
bcall(8087h) ;_WriteFlashUnsafe
call getCertPage
ld de,4000h
ld b,0
bcall(_WriteAByte) ;mark the unused sector as valid as well ;(this will confuse the boot code beyond repair)
xor a
ld de,0056h
ld b,0
bcall(_WriteAByte) ;invalidate OS
bcall(_MarkOSValid) ;mark OS valid so boot code must invalidate it
rst 00h ;reboot to the boot code



It is the opening section of BrandonW's brick.8xp
Firstly, no on your first piece of code. Doors CS creates each folder as a separate file called %FLDN, where N is a byte value from $00 to $FF. If you want to do the lame, Omega(n^2) method instead of the Omega(n) method, you search for %FLD[$01], then %FLD[$02], etc, and create the first one that doesn't exist. Once you figure out how to create that with size 8 bytes, you copy the name in with nulls padding it out to 8 bytes.

ACagliano wrote:
Where is the T2 byte (if you know)?
You're really tempting me to flare my nostrils with that "if you know" line. Laughing I wrote the freaking shell and the entire folder system, how could I not know where the T2 byte is? It's the byte below the first byte of the VAT entry for a given program. I don't know if Axe has a way to give you the VAT entry of a program.
KermMartian wrote:


ACagliano wrote:
Where is the T2 byte (if you know)?
You're really tempting me to flare my nostrils with that "if you know" line. 0x5 I wrote the freaking shell and the entire folder system, how could I not know where the T2 byte is? It's the byte below the first byte of the VAT entry for a given program. I don't know if Axe has a way to give you the VAT entry of a program.


I know you know where the T2 byte is. Sorry. I typed that bad. I was asking if you know how to access it in AXE, in relation to where the size byte is. If you can tell me how many bytes below the size bytes it is, I can do this:

assume the T2 byte is 4 bytes below the size byte (just picking a random number). Then it is accessed in Axe by

{V-6}

because the size bytes are two below the data start (V) and the T2 byte is 4 below that, so thats V-6 to get to it.


Oh, and what is the "%". Is it necessary?
ACagliano wrote:
KermMartian wrote:


ACagliano wrote:
Where is the T2 byte (if you know)?
You're really tempting me to flare my nostrils with that "if you know" line. 0x5 I wrote the freaking shell and the entire folder system, how could I not know where the T2 byte is? It's the byte below the first byte of the VAT entry for a given program. I don't know if Axe has a way to give you the VAT entry of a program.


I know you know where the T2 byte is. Sorry. I typed that bad. I was asking if you know how to access it in AXE, in relation to where the size byte is. If you can tell me how many bytes below the size bytes it is, I can do this:

assume the T2 byte is 4 bytes below the size byte (just picking a random number). Then it is accessed in Axe by

{V-6}

because the size bytes are two below the data start (V) and the T2 byte is 4 below that, so thats V-6 to get to it.
Hehe, no problem. Actually, the T2 byte of a program (along with the pointer to the program, its Flash page, and its name) are all stored in the VAT, not with the program's data. Axe does not return the VAT pointer from any of its functions?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
» View previous topic :: View next topic  
Page 4 of 8
» All times are UTC - 5 Hours
 
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

 

Advertisement