Floppys and Virus

TuffyDK
Posts: 19
Joined: Sat Jan 14, 2023 7:41 pm
Has thanked: 5 times
Been thanked: 4 times

Floppys and Virus

Unread post by TuffyDK »

Hi.

I have found a BEEP load of demo adf's on the net.

My question is now, everytime i load in a new floppy by pressing on df0 and choose a new .adf file, then do a reset. If the first disk has a virus on in will it survive the reset function in mister/minimig and spred to the other disks (there is no write protection in the menu's, YET I guess)

Regards
TuffyDK

Bas
Top Contributor
Posts: 623
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 80 times
Been thanked: 324 times

Re: Floppys and Virus

Unread post by Bas »

While I don't have the definitive answer to your question, you could mount your collection read-only over CIFS and implement write protection that way. Nothing could even hope to write to your floppy images then.

I would think a reset from the OSD amounts to a full power cycle on the Amiga, and nothing would survive that.. It does bear some testing. I'd like to try that if someone here has a link to an ADF that positively is infected with a virus. Modification by a virus is trivially detectable by pulling a sha256sum of the ADF before and after.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

One way to test would be using a recoverable RAM disk, and seeing if it recovers after a GUI reset. If one survives control-windows-windows, but doesn't survive the GUI reset, then reset should also be clearing viruses.

And, yes, a write protection option in the core would be an excellent idea.

User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Floppys and Virus

Unread post by kathleen »

Maybe I'm wrong but instead of selecting an .ADF file, if you select a .ZIP file (where the .ADF is inside) I think that the core cannot write on this disk.
If is this well the case it could be a workaround to the ReadOnly option.

かすりん

User avatar
limi
Top Contributor
Posts: 776
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 180 times
Been thanked: 570 times

Re: Floppys and Virus

Unread post by limi »

TuffyDK wrote: Sat Feb 04, 2023 9:49 am

My question is now, everytime i load in a new floppy by pressing on df0 and choose a new .adf file, then do a reset. If the first disk has a virus on in will it survive the reset function in mister/minimig and spred to the other disks (there is no write protection in the menu's, YET I guess)

Yes, it will stay resident and spread to your other disks unless you write protect the ADF files, just like real hardware.

A good way to keep this separate from everything else is to make an Amiga 500 MGL setup (so it won’t spread to your non-ADF setups), and write-protect your ADFs as already mentioned. If you want to be extra paranoid, do a hard reset / cold reboot between switching ADFs, but this is of course a bit of a hassle.

(We’re including a dedicated A500 MGL setup for demos and other ADFs with the upcoming version of MegaAGS, FWIW)

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

Out of interest, what does MGL mean in that context? I'm trying to parse it, and am failing completely.

Missus
Posts: 183
Joined: Fri Jan 27, 2023 12:45 am
Has thanked: 48 times
Been thanked: 43 times

Re: Floppys and Virus

Unread post by Missus »

Malor wrote: Sun Feb 05, 2023 2:16 am

Out of interest, what does MGL mean in that context? I'm trying to parse it, and am failing completely.

https://mister-devel.github.io/MkDocs_M ... anced/mgl/

'MGL Files

MGL files are used as a custom method to load games directly from the MiSTer FPGA's Menu core.

They can be placed in the root of the SD card to show up in the top of the menu, or in a menu folder. A menu folder is a regular folder with an underscore (_) in front that will display in the menu. You can create your own menu folders.

Not all cores support MGL files, though all the most popular cores do. Console support is good, but computer cores generally don't work well with them, unless they have some mechanism to auto-boot a loaded game.

MGL Format

MGLs are simple XML files with the file extension .mgl. Whatever name you give to an MGL file (excluding the extension) is what will be shown for its entry in the menu. E.g. My Favorite Game.mgl will display in the menu as My Favorite Game.'

R4M
Posts: 32
Joined: Wed May 27, 2020 2:27 pm
Has thanked: 2 times
Been thanked: 9 times

Re: Floppys and Virus

Unread post by R4M »

You can also patch your kickstart ROM to always execute a full cold boot. That way no virus can survive a reset.

Actually, you have to put $60 into $f80154 in the official KickV1.3_34.005 (replacing $66).

TuffyDK
Posts: 19
Joined: Sat Jan 14, 2023 7:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Floppys and Virus

Unread post by TuffyDK »

Bas wrote: Sat Feb 04, 2023 1:01 pm

While I don't have the definitive answer to your question, you could mount your collection read-only over CIFS and implement write protection that way. Nothing could even hope to write to your floppy images then.

I would think a reset from the OSD amounts to a full power cycle on the Amiga, and nothing would survive that.. It does bear some testing. I'd like to try that if someone here has a link to an ADF that positively is infected with a virus. Modification by a virus is trivially detectable by pulling a sha256sum of the ADF before and after.

Hi.

Have you tried the CIFS and read-only mode??? I have just tried it with this script (https://github.com/MiSTer-devel/Scripts ... s_mount.sh) and the scrip is working (even the CIFS off). I can see all the directories in it but cant select the .adf file, it just dont show up.

I have testet the user from my pc, and i can see the file, copy the file and even load it in notepad++, but not working on mister.

If I set Read/Write access on the NAS there are no problem with Mister.

So whats missing here, or its actuall not working, meaning - Have you tried it????

Regards
TuffyDK

User avatar
limi
Top Contributor
Posts: 776
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 180 times
Been thanked: 570 times

Re: Floppys and Virus

Unread post by limi »

Missus wrote: Sun Feb 05, 2023 8:24 am
Malor wrote: Sun Feb 05, 2023 2:16 am

Out of interest, what does MGL mean in that context? I'm trying to parse it, and am failing completely.

https://mister-devel.github.io/MkDocs_M ... anced/mgl/

'MGL Files

MGL files are used as a custom method to load games directly from the MiSTer FPGA's Menu core.'

That, and also a way to launch cores with alternate setups, e.g. having a dedicated core for Game Gear by using the Master System core, but it can have its own set of games and video filters, etc.

Malor: Here’s an example of how it can be used:

Computer core menu
Computer core menu
IMG_8552.jpg (1.19 MiB) Viewed 4917 times
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

Oh, wow, I totally spaced on MGL files being from favorites.sh. Didn't even occur to me that you could use it for different hardware configs. That's a great idea!

TuffyDK
Posts: 19
Joined: Sat Jan 14, 2023 7:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Floppys and Virus

Unread post by TuffyDK »

limi wrote: Sun Feb 05, 2023 9:48 pm
Missus wrote: Sun Feb 05, 2023 8:24 am
Malor wrote: Sun Feb 05, 2023 2:16 am

Out of interest, what does MGL mean in that context? I'm trying to parse it, and am failing completely.

https://mister-devel.github.io/MkDocs_M ... anced/mgl/

'MGL Files

MGL files are used as a custom method to load games directly from the MiSTer FPGA's Menu core.'

That, and also a way to launch cores with alternate setups, e.g. having a dedicated core for Game Gear by using the Master System core, but it can have its own set of games and video filters, etc.

Malor: Here’s an example of how it can be used:

IMG_8552.jpg

Looks cool - Can your share your MGL files for Amiga 500HD and Amiga 600HD??

User avatar
limi
Top Contributor
Posts: 776
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 180 times
Been thanked: 570 times

MGL setups for Amiga

Unread post by limi »

The MGL file doesn’t do much by itself, it just defines a copy/proxy for an existing core and lets you have a second setup with different configurations. The real work is of course in creating the HD-compatible patched Kickstart for e.g. A500 to boot from an HD, making sure it still runs on a file system that doesn’t corrupt itself if restarted in the middle of a write operation, making the MiSTer shared drive work on Kickstart 1.3 etc. The upcoming version of MegaAGS will handle all of this.

Here’s how the MGL file looks, for reference:

Code: Select all

<mistergamedescription>
    <rbf>_computer/minimig</rbf>
    <setname>Amiga500HD</setname>
</mistergamedescription>

This will give you an option in the _Computer menu (named whatever you name the .mgl file) that will launch the Minimig core, but use the files and configuration defined for the A500HD entry, and default to /games/A500HD.

Sneak preview:

IMG_8477.jpeg
IMG_8477.jpeg (1.26 MiB) Viewed 4657 times
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

BTW, I accidentally ended up testing the read/write protection on a floppy image; if it's stored on a filesystem that honors permissions, setting it read-only will give it a little lock icon on the filename in the GUI. This won't work on the default exFAT filesystem the Mister uses. If you use almost any other filesystem, though, whether on USB storage or via an SMB3 share, you can definitely lock your floppy images, and you even get a visible indicator.

Write protection would be better in the core itself, but the workaround exists, if a secondary filesystem isn't too painful.

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Floppys and Virus

Unread post by bbond007 »

Many years ago when I first got my Minimig 1.1 I would download stuff from Aminet using Bluetooth to serial adapter and the Roadshow TCP/IP stack.

Anyway, I ended up getting "Happy New Year 96" (many years late) from Aminet.

I would recommend running this program (VirusZ) https://www.vht-dk.dk/amiga/vz/vz.htm to remove and detect viruses...

It did help me irradicate "Happy New Year 96" on my system.

TuffyDK
Posts: 19
Joined: Sat Jan 14, 2023 7:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Floppys and Virus

Unread post by TuffyDK »

bbond007 wrote: Tue Feb 14, 2023 7:22 pm

Many years ago when I first got my Minimig 1.1 I would download stuff from Aminet using Bluetooth to serial adapter and the Roadshow TCP/IP stack.

Anyway, I ended up getting "Happy New Year 96" in the (many years late) from Aminet.

I would recommend running this program (VirusZ) https://www.vht-dk.dk/amiga/vz/vz.htm to remove and detect viruses...

It did help me irradicate "Happy New Year 96" on my system.

True, and I have seen those happy new year 96 virus on many .adf files - But there are just more than this virus for the Amiga. So Write protect floppy is the way forward, but not yet possible for the Mister FPGA and Amiga (for now, if it comes)

But then I have my Amiberry :mrgreen:

User avatar
Chilli_Vibes
Posts: 129
Joined: Sat Mar 12, 2022 4:47 pm
Has thanked: 53 times
Been thanked: 33 times

Re: Floppys and Virus

Unread post by Chilli_Vibes »

The way forward is IPF support, then nobody will have to deal with dodgy viruses, dodgy cracks, and crap 90s intros.
With IPF, it just works because it's a 1-to-1 copy of the original media, with copy protection intact.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

Some games came with viruses, so IPF is no guarantee of anything. And writable IPFs will be just as vulnerable to external infection as writable ADFs.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: Floppys and Virus

Unread post by rhester72 »

Malor wrote: Wed Feb 15, 2023 12:13 am

Some games came with viruses, so IPF is no guarantee of anything. And writable IPFs will be just as vulnerable to external infection as writable ADFs.

There's literally no such thing as a 'writable IPF'. You can do diff imaging to make it appear so, but IPFs are never altered.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Floppys and Virus

Unread post by Malor »

Huh, I guess WinUAE tricked me somehow. But any diff system that allows persistent writes will still infect the virtual floppy images, whether those images end up in two files on disk or not.

Regardless, IPFs still do almost nothing about viruses that write protection doesn't already cover. It's a mostly fake justification to insist that someone's favorite feature be included.

User avatar
Chilli_Vibes
Posts: 129
Joined: Sat Mar 12, 2022 4:47 pm
Has thanked: 53 times
Been thanked: 33 times

Re: Floppys and Virus

Unread post by Chilli_Vibes »

Malor wrote: Wed Feb 15, 2023 12:13 am

Some games came with viruses, so IPF is no guarantee of anything. And writable IPFs will be just as vulnerable to external infection as writable ADFs.

You literally have no idea what you are on about. Just like 99.9% of your posts.

Post Reply