Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

  1. #11

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    Yet another design flaw and many more bugs are fixed.

    Upgrades
    power off + suspend
    vl command will include filter for day.


    The suggestion box is still open.

  2. #12

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    Completed:
    vl command extended to include day.
    version information command includes output of CFG file.

    scanvirus has redesigned at various levels.



    Scan Virus
    help commands
    -------------
    virus scan linux files
    p1: -l or linux
    p2: u freshclam update (optional)
    p2: l low system priority (optional)
    p2: h high system priority (optional)
    p2: p shutdown on end (optional)
    p2: f scan folder (optional)

    virus scan windows files
    p1: -m or -mswin
    p2: c copy infected files to vault (optional)
    p2: m move infected files to vault (optional)
    p2: u freshclam update (optional)
    p2: l low system priority (optional)
    p2: h high system priority (optional)
    p2: p shutdown on end (optional)
    open virus vault (KDE)
    p1: -vf
    view logs
    p1: -vl
    p2: l or m mask by linux/mswin scans (optional)
    p2: d mask by date (optional)
    p3: year (optional)
    p4: month (optional)
    p4: day (optional)
    view virus reports + virus files
    p1: -vr or -viewvirusreports
    view version information + view cfg file
    p1: -v or --version

    ______________________________scanvirus configuration______________________________
    Date[space]Time or Time[space]Date
    date +'%Y-%m-%d %I:%M:%S%P'
    DateTimeStamp= %Y-%m-%d %I:%M:%S%P
    ___________________________________________________________________________________
    ExcludedScanFolders= dev etc kdeinit5__0 proc tmp srv sys .snapshots
    ___________________________________________________________________________________



    Suspend system option might be added. Any suggestions and comment welcome at this time.

  3. #13

    Default Re: SCANVIRUS application layer for clamscan - stable - suggestion box

    Hello. I'v succeeded in removing all the bugs and design flaws that prevented me from doing a stable release.

    I'm currently working out some security issues.


    Scan Virus
    help commands
    -------------
    virus scan linux files
    p1: -l or --linux
    p2: u freshclam update (optional)
    p2: l low system priority (optional)
    p2: h high system priority (optional)
    p2: p suspend on end (optional)
    p2: p shutdown on end (optional)
    p2: f scan folder (optional)

    virus scan windows files
    p1: -m or --mswin
    p2: c copy infected files to vault (optional)
    p2: m move infected files to vault (optional)
    p2: u freshclam update (optional)
    p2: l low system priority (optional)
    p2: h high system priority (optional)
    p2: p shutdown on end (optional)

    open virus vault (Desktop: KDE & GNOME)
    p1: -vf or --viewfolder

    view logs
    p1: -vl or --viewlogs
    p2: l or m mask by linux/mswin scans (optional)
    p2: d mask by date (optional)
    p3: year (optional)
    p4: month (optional)
    p5: day (optional)

    view virus reports + virus files
    p1: -vr or --viewvirusreports

    view version information + configuration file
    p1: -v or --version

    Copy virus vault to user #
    p1: l list users
    p2: user number

    view help file
    p1: -h or --help

    ______________________________scanvirus configuration______________________________
    Date[space]Time or Time[space]Date
    date +'%Y-%m-%d %I:%M:%S%P'
    DateTimeStamp= %Y-%m-%d %I:%M:%S%P
    ___________________________________________________________________________________
    ExcludedScanFolders= dev etc kdeinit5__0 proc tmp srv sys .snapshots
    ___________________________________________________________________________________
    Bash Suspend Command
    1= 'systemctl suspend' - openSUSE, Ubuntu, Fedora, Arch, Debian, etc
    2= 'pm-suspend' - Void, Gentoo, Devuan etc - pm-utils power management suite
    SuspendCommand= 1
    ___________________________________________________________________________________



    Suggestions are welcome for now...

  4. #14

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    I found another possible security issue. When you use the suspend or power off command, You will leave the system unattended to do something else. That might include leaving the room or the area. In some cases, a locked room. In other cases, someone else could get access. So, I'm working on a fix to exit the terminal and leave scanvirus running. As long as the linux system isn't shutdown before its finished, scanvirus will continue running in the background.

    I'm working on problem...

  5. #15

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    I've made the breakthrough in fixing the security hole for suspend and power off.

    In the linux scan, scanvirus will now shift into the background, allowing you to 'exit' from terminal superuser mode and close the window. Fixing the windows scan will soon follow.

    This is how it will work: high-priority update suspend

    [Terminal Window]
    su
    [password]
    #scanvirus -l hus
    #exit
    #exit

    [window closed]
    [system will suspend when scanvirus completes it's scan]

    As long as you don't suspend or power off the system, it will shutdown or power off by itself.

    I'm trying to get the script do the 'exit' 'exit' for you.

  6. #16

    Default SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    Security updates:

    scanlogs now include power-off and suspend requests.
    scanvirus folders and files are secured for root only users.
    Security checks are now performed at any function.

    linux scan upgrades are now complete.

    Suspend and poweroff now send the scan to background. Optional for KDE, close all terminal windows.

    After 'exit' 'exit' or changing the cfg file, the system will work as normal until the scan is complete.

    If you logout, the shutdown or suspend will work.

    ___________________________________________________________________________________
    On suspend or power-off close all terminal windows (KDE)
    CloseTerminalWindows= 0
    ___________________________________________________________________________________

    Working on being able to use the above with gnome as well.

    I should be finished similar mswin upgrades in a few days.

  7. #17

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    I finished all the main upgrades. I'm currently running tests. A beta will be available for limited release for 24 hours. I have no method to test the gnome functions. So, I'll need you people to test it and report any problems with gnome or anything else.

    Don't upload this beta anywhere. Keep only until the stable release. I might add features, fixes, and other code upgrades I don't post on here.

  8. #18

    Default SCANVIRUS application layer for clamscan - beta test release - suggestion box

    https://paste.opensuse.org/1848c754

    For those paying attention, this is the beta test version of stable v1.00 release.

    It's been been tested for bugs and smooth operation. Any problems, bugs, or to just complement me. Hint Hint.

    There are many unfinished functions and design improvements. So, don't upload it anywhere else! Don't keep it after the stable release.

    The app will upgrade itself. Later versions will require use of 'su -'. This doesn't. Expect changes in the new cfg file.

  9. #19

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    Here's a security patch upgrade for the beta test. Replace all permissions lines. If you have the last version, you will need to replace similar lines. You will still have to make scanvirus executable before you overwrite it.

    After

    Code:
    # if clamscan not installed 
    clamscan --help > /dev/null 2>&1
    if [[ $? == 127 ]]; then
       echo "clamscan not installed" 1>&2
       exit 1
    fi
    
    # if clamscan not installed 
    udisksctl --help > /dev/null 2>&1
    if [[ $? == 127 ]]; then
       echo "udisks2 not installed" 1>&2
       exit 1
    fi
    
    #chmod u=rwx,g=,o= [folder/file]
    umask 077
    
    #export TERM=vt100
    Before

    Code:
         #read configuration file lines into array
         while read -r line
         do
              #check for varible lines
              if [[ "$line" == 'DateTimeStamp='* ]];then
                   #remove all past ';'
                   #printf "%s\n" "$line"
                   DTS_tmp1=${line#DateTimeStamp= *}
                   #printf "%s\n" "$DTS_tmp1"
                   DTS_Format=${DTS_tmp1%%;*}
                   #printf "%s\n" "$DTS_tmp2"
    
                   #check for valid date and time
                   Date_Time_Stamp=$( date +"$DTS_Format" )
                   if [[ $? != 0 ]]; then
                        echo "----- Date time stamp error -----"
                        exit 1
                   fi
     
              elif [[ "$line" == 'ExcludedScanFolders='* ]];then
                   shopt -s lastpipe;printf "%s" "${line#ExcludedScanFolders= *}" | read -a ExcludedScanFolders;shopt -u lastpipe
              elif [[ "$line" == 'SuspendCommand='* ]];then
                   shopt -s lastpipe;printf "%s" "${line#SuspendCommand= *}" | read SuspendCommand;shopt -u lastpipe
              elif [[ "$line" == 'LockScreenCommand='* ]];then
                   shopt -s lastpipe;printf "%s" "${line#LockScreenCommand= *}" | read LockScreenCommand;shopt -u lastpipe
              fi
         done < /var/log/VirusVault/scanvirus.cfg
         
         #printf "%s\n" "$Date_Time_Stamp"
         #printf "%s\n" "${ExcludedScanFolders[@]}"
         #printf "SuspendCommand= %s\n" $SuspendCommand
         #exit 1
    
         Virus_Vault_Folder='/var/log/VirusVault'
    Code:
    #check file permissions and ownership
    check_permissions_ownership()
    {
         #check if file or folder or executable
         if [[ "$2" == 'x' ]]; then
              Read_Permissions='-rwx------'
              Write_Permissions='u=rwx,g=,o='
         elif [[ -f "$1" ]]; then
              Read_Permissions='-rw-------'
              Write_Permissions='u=rw,g=,o='
         elif [[ -d "$1" ]]; then
              Read_Permissions='drwx------'
              Write_Permissions='u=rwx,g=,o='
         else
              printf "Not folder or file or executable\n"
              exit
         fi
    
         #printf "%s\n" $(stat -c '%A' "$1")
         #printf "%s\n" $Read_Permissions
         
         #check file permissions
         if [[ "$(stat -c '%A' "$1" )" != "$Read_Permissions" ]]; then
              printf "Setting permissions --> %s\n" $1
              chmod "$Write_Permissions" "$1"
         #else
         #     printf "Permissions verified --> %s \n" $1
         fi
    
         #check owner and group name
         if [[ "$(stat -c '%U %G' "$1")" != 'root root' ]]; then
              printf "Setting ownership and group name --> %s\n" $1
              chown root:root "$1"
         #else
         #     printf "Ownership and group name verified --> %s\n" $1
         fi
    }
    
    check_permissions_ownership '/usr/bin/scanvirus' x
    check_permissions_ownership '/var/log/VirusVault'
    check_permissions_ownership '/var/log/VirusVault/VirusFound'
    check_permissions_ownership '/var/log/VirusVault/scanvirus.cfg'
    check_permissions_ownership '/var/log/VirusVault/VirusScanLog.txt'
    Change these lines:

    Code:
    #: Last Edit   : Mon  Jun 16  01:00 PST 2020
             printf "Build #2020.06.16.01.00\n"

  10. #20

    Default Re: SCANVIRUS application layer for clamscan - alpha 8 - suggestion box

    For those paying attention to this blog, another beta test version is available. Don't upload file anywhere! Don't keep it! The official version may have upgrades and bug fixes not stated.

    https://paste.opensuse.org/f948c74f

    Available for one day only.

    Any comments,suggestions,bugs,security issues, or just plain complements post on here. Hint Hint.

    Upgrades: total scan time in logs and in virus reports. Nothing new after that.

    Design flaw: It stalls on every directory scan. The scan has to restart on every folder. I'v not found a way to make clamscan in this version to scan specific folders. It's likely likely a bug in the current engine.

    copy to: /usr/bin/scanvirus & enable executable

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •