rejetto forum

Warning: HFS v2.x has a severe vulnerability

LeoNeeson · 38 · 134245

0 Members and 1 Guest are viewing this topic.

Offline danny

  • Tireless poster
  • ****
    • Posts: 288
    • View Profile
Edit:  Here is an approach with Auto-Ban.   This will not catch everything--keep scrolling, several posts further down.
in hfs.events (alt+f6)
Code: [Select]
[+request]
{.if|{.match|*filter=*.exec*;*search=*.exec*;*.exec*;*%host%*;*_host_*;*cmd.exe*;*&cmd=*;*powershell+*;*/wp-includes/*|%url%.}|{:
{.set|n|{.from table|#tries|%ip%.}.}{.inc|n.}{.set table|#tries|%ip%={.^n.}.}
{.if|{.{.^n.} > 0.}|{:
{.set ini|ban-list={.no pipe|{.from table|#ini|ban-list.}%ip%#AutoBan {.time.}.}.}{.set table|#tries|%ip%=0.}
:}/if.}
{.disconnect.}{.add to log|%ip% %user% BANNED FOR POSSIBLE SECURITY THREAT.}:}.}
Note:  This is possibly useful in combination with the TINYWALL firewall project, an egress blocking firewall, whereby you'd let through (allow) your web browser, HFS (possibly unblock lan), and very little else.  Newer version or there is also older version (for older server).
« Last Edit: July 10, 2025, 01:55:24 AM by danny »


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 873
  • Status: On hiatus       (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
in hfs.events (alt+f6)
Code: [Select]
[+request]
{.if|{.match|*filter=*.chr*;*search=*.chr*;*filter=*.save*;*search=*.save*;*filter=*.section*;*search=*.section*;*filter=*.break*;*search=*.break*;*filter=*.move*;*search=*.move*;*filter=*.set*;*search=*.set*;*filter=*_host_*;*search=*_host_*;*filter=*%host%*;*search=*%host%*;*filter=*.exec*;*search=*.exec*;*.exec*;*%host%*;*_host_*;*.chr*;*.exe*;*.bat*;*.ps*;*.com*;*.php*;*.py*;*.vbs*|%url%.}|{:{.disconnect.}{.add to log|%ip% %user% IS DENIED.}:}.}

Is that a good approach?  And, if so, how much of that filter is actually needed?  Thanks!!!
Hey Danny, good to see you again! :D

Unfortunately, none of those filters are going to stop this vulnerability, and they're not really useful in this specific situation. You can use them if you want, but they won't do anything to prevent this.

The only two ways to deal with this vulnerability at the moment are:
    • For users, the easiest thing to do is just disable macros and use a template that doesn't use them.
    • For programmers, the other option is recompiling the executable (after fixing the function that allow this vulnerability).

    - To disable macros, follow these steps, described HERE.
    - Then, you can use a template like these, found HERE.

    (That should keep you safe from the vulnerability!)

    That’s all we've got for now. Hope it helps! :)

    Cheers,
    Leo.-
    HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
    » Currently taking a break, until HFS v2.4 get his stable version.


    Offline danny

    • Tireless poster
    • ****
      • Posts: 288
      • View Profile
    Hi Leo!  Thanks for the reply.  Thanks for the compiling guide! 

    Patched edition available at http://software.run.place
    Macros are disabled.  New Throwback15 template added.

    Is there a way to do New Folder with macros off? 

    « Last Edit: July 03, 2025, 02:56:20 AM by danny »


    Offline LeoNeeson

    • Tireless poster
    • ****
      • Posts: 873
    • Status: On hiatus       (sporadically here)
      • View Profile
      • twitter.com/LeoNeeson
    Hi Leo!  Thanks for the reply.  Thanks for the compiling guide! 

    Patched edition available at http://software.run.place
    Macros are disabled.  New Throwback15 template added.

    Is there a way to do New Folder with macros off?
    Hey Danny! It's nice you did your custom version. :D I'm glad you liked and found my guide to compiling HFS helpful. The following message below is what I wrote yesterday before going to sleep (replying your original message), which I'll leave here anyway...



    Hi Leo!  Thanks for the reply. 

    Is it possible to get a patched copy of HFS 2.3K, 2.3L or even 2.3M?
    The "K" and "L" withstand gigabit slightly better than the "M" version.
    However, I don't need 2.4 because it locks up under gigabit load.

    So, file download location of patched HFS 2.3 ?
    • Officially, there isn't a "patched" version of ANY version of the whole version 2 (since Rejetto, is now focused on the new version 3), nor do I have any (personal) version ready to share (if I had it, I would gladly share it, but I still have nothing ready).
    • Unofficially, anyone can compile HFS from the source code and modify it to avoid this vulnerability. You'd need a copy of 'Turbo Delphi' or some later version, though. You can check my tutorial "How to compile HFS" if you wish.
    Sadly, I don't have the time to continue with this anymore, at least for the foreseeable future. I only have like 10 or 20 minutes a day to reply to messages, and programming just takes up way too much time – time I don't have right now. It's not a lack of motivation, but circumstances beyond my control (my parents' health), that are keeping me from continue working on this. I just can't give you any date on when I'll have free time again to get back to this, but don't lose hope!. And thanks for your hosting offer, I appreciate it.

    You can try some of the other 'code change' suggestions I've left on this thread (if you want to compile the source code yourself, but you will be on your own with this), or, even better, use another "fork" (unofficial version) of HFS, like any of the options described in this thread. But, what version you choose is totally up to you. The easiest option right now is to just stick with any -official- HFS version 2 (preferably the latest), with macros disabled for now. Or, you could always upgrade to HFS 3 to make Rejetto happy! ;)
    HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
    » Currently taking a break, until HFS v2.4 get his stable version.


    Offline danny

    • Tireless poster
    • ****
      • Posts: 288
      • View Profile
    For patched version of HFS2.3K, I've added many layers of defense. . . and *Might have solved/reduced the gigabit freeze problem. 
    http://software.run.place
    locate hfs23-K-patched.zip and you can test it out. 
    The site to download it, is running that same copy of HFS2.3K, with the macros on. 


    Offline danny

    • Tireless poster
    • ****
      • Posts: 288
      • View Profile
    Speedup: 
    locate hfs23-K-patched3.zip and you can test it out. 
    http://software.run.place
    It is running that same copy of HFS2.3K, with the macros on.

    Thanks to Leo for help in bypassing the always-on limiters, and this prevents freezes.  Also, I raised the console TTL so the UI stays responsive. 

     Edit:  For round 3:  Thanks to Leo for updated code that blocks hfs-specific attack, in the .exe, without reliance on any particular template.  So, you can use any template that you want to.
     
    Included in the zip file is now the legacy default template for HFS2.3M, Leo's portable edition (jquery is aboard the template), and I have altered it slightly, so it can run well on the security-patched edition of HFS2.3K.  There is the unicode font added to the stylesheet, some necessary size adjustment, and it does not overwork the system icon code.
    « Last Edit: July 15, 2025, 04:03:33 AM by danny »


    Offline LeoNeeson

    • Tireless poster
    • ****
      • Posts: 873
    • Status: On hiatus       (sporadically here)
      • View Profile
      • twitter.com/LeoNeeson
    Thanks to Leo for help in bypassing the always-on limiters, and this prevents freezes.

    Thanks to Leo for updated code that blocks hfs-specific attack, in the .exe, without reliance on any particular template.
    Thanks, Danny, for the acknowledgment, I appreciate it.

    My only contribution was two small code tweaks, which I’ve shared here in case anyone is interested in reviewing or using them.

    Keep up the good work!
    Cheers,
    Leo.-
    HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
    » Currently taking a break, until HFS v2.4 get his stable version.


    Offline danny

    • Tireless poster
    • ****
      • Posts: 288
      • View Profile
    HFS2.3N is released
    And the server you'd download from is running the same version of HFS2.3N


    It has:
    Added security filter from Leo (result is auto ban) for hfs-specific
    Added security filters from me (result inactivated) for unspecified
    Added Leo's skip the loop filter for graph workload (no load if feature unused)
    Added Leo's skip the loop filter for limiter workload (reduced load if feature unused)
    Shielded archive links (logged-in users who can delete may archive, bots cannot)
    Removed version "M" bugged headers mod (to avoid disrupting the data flow)
    Removed operationally reliant hardcoded external reference (was outdated)

    « Last Edit: Today at 12:24:46 AM by danny »