Changeset 3250641
- Timestamp:
- 03/04/2025 07:23:42 PM (12 months ago)
- Location:
- bitfire/trunk
- Files:
-
- 10 edited
-
error_handler.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
src/bitfire.php (modified) (1 diff)
-
src/bitfire_pure.php (modified) (1 diff)
-
src/dashboard.php (modified) (1 diff)
-
src/headers.php (modified) (1 diff)
-
src/storage.php (modified) (5 diffs)
-
src/util.php (modified) (3 diffs)
-
uninstall.php (modified) (1 diff)
-
verify.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bitfire/trunk/error_handler.php
r3234339 r3250641 144 144 $e['id'] = uniqid(); 145 145 $e['php_ver'] = phpversion(); 146 $e['ref_id'] = $_SERVER[' REQUEST_URI']??"na";146 $e['ref_id'] = $_SERVER['HTTP_HOST']??'unknown' . $_SERVER['REQUEST_URI']??"/na"; 147 147 148 148 $encoded = array_map(function ($k, $v) { -
bitfire/trunk/readme.txt
r3250587 r3250641 5 5 Tags: security, firewall, malware scanner, waf, activity log 6 6 Requires at least: 5.0.0 7 Tested up to: 6.7. 18 Stable tag: 4. 4.197 Tested up to: 6.7.2 8 Stable tag: 4.5.0 9 9 Requires PHP: 7.4 10 10 License: AGPLv3 or later … … 17 17 ### Enterprise class security 18 18 19 BitFire is an advanced Runtime Application Self Protection firewall for WordPress. The software requires careful setup and maintenance and is intended for enterprise WordPress installs with dedicated web staff. If you do not intend to actively manage your WordPress security environment you should consider investing in alternate software. BitFire is ment to be run on high end WordPress hosting servers. Low end servers (<$8 / month) might not meet the minimum system requirements and could encounter errors . Pay careful attention to your serverin such environments.20 21 BitFire is commercial software . This free release made publically available on wordpress.org includes some core features including the most advanced traffic logger available for WordPress and our bot blocking functionality19 BitFire is an advanced Runtime Application Self Protection firewall for WordPress. The software requires careful setup and maintenance and is intended for enterprise WordPress installs with dedicated web staff. If you do not intend to actively manage your WordPress security environment you should consider investing in alternate software. BitFire is ment to be run on high end WordPress hosting servers. Low end servers (<$8 / month) might not meet the minimum system requirements and could encounter errors with file locking, semaphores and shared memory access. Pay careful attention to your server when using BitFire in such environments. 20 21 BitFire is commercial software used by enterprises with managed security staff. This free release made publically available on wordpress.org includes some core features including the most advanced traffic logger available for WordPress and our bot blocking functionality. 22 22 23 23 ### Elevate Your Web Security with Cutting-Edge AI and Machine Learning ### 24 24 25 In an era where digital threats evolve at breakneck speed, traditional security measures no longer suffice. Enter BitFire, the revolutionary WordPress firewall that harnesses the power of Generative AI and Machine Learning. This innovative solution marks a significant leap forward, offering a bespoke security strategy tailored to each individual website.25 In an era where digital threats evolve at breakneck speed, traditional security measures no longer suffice. BitFire is a revolutionary WordPress firewall that harnesses the power of Generative AI and Machine Learning on hundreds of gigabytes of WordPress traffic. This innovative solution marks a significant leap forward, offering a bespoke security strategy tailored to each individual website. 26 26 27 27 BitFire introduces a pioneering "block by default" model, setting a new standard in proactive defense. By generating a unique allow list for each site, it ensures that only legitimate traffic gains entry. This approach blocks zero-day attacks instantly, without the need for frequent signature updates. It's not just a firewall; it's your website's personalized guardian, designed to distinguish between friend and foe with unprecedented accuracy. … … 96 96 * Database of 10,000,000+ valid wordpress plugin and theme file hashes. 97 97 * Scan up-to 10,000 files per minute with our unique fast-hashing technology. 98 * Professional US based security experts to perform hand malware removal if needed ($ 128.00 USD).98 * Professional US based security experts to perform hand malware removal if needed ($99.00 USD). 99 99 100 100 #### Web Application Firewall [PRO] -
bitfire/trunk/src/bitfire.php
r3212327 r3250641 869 869 // TODO: simplify this, we can spare some cycles here, less code, more data 870 870 $f = \BitFire\WAF_ROOT."/data/ip.8.txt"; 871 if ( random_int(1, 100) == 81 && file_exists($f)) {871 if (mt_rand(1, 100) == 81 && file_exists($f)) { 872 872 $n=un_json(file_get_contents($f)); 873 873 $t = time(); -
bitfire/trunk/src/bitfire_pure.php
r3057065 r3250641 688 688 public static function new(string $ip, int $browser_id = 0, bool $is_bot = false) : BrowserState { 689 689 $state = new BrowserState(); 690 $state->_iv = random_int(0, 0xFFFFFFFF); 691 $state->answer = random_int(0xFFFF, 0xFFFFFFFF); 690 try { 691 $state->_iv = random_int(0, 0xFFFFFFFF); 692 $state->answer = random_int(0xFFFF, 0xFFFFFFFF); 693 } catch(Exception $e) { 694 $state->_iv = mt_rand(0, 0xFFFFFFFF); 695 $state->answer = mt_rand(0xFFFF, 0xFFFFFFFF); 696 } 692 697 $state->time = time(); 693 698 $state->_ip = $ip; -
bitfire/trunk/src/dashboard.php
r3234339 r3250641 951 951 952 952 953 /*954 $nnn = random_int(0, 4);955 for ($i = 0; $i<$nnn; $i++) {956 $bot->classification |= 1 << random_int(2, 12);957 }958 */959 960 961 953 foreach (REQ_NAMES as $key => $mask) { 962 954 if ($bot->classification & ($mask)) { -
bitfire/trunk/src/headers.php
r3057065 r3250641 63 63 $results = [404, 403, 200]; 64 64 $result = $results[array_rand($results)]; 65 $version = random_int(1, 5) .".". random_int(1, 9) ."." . random_int(1,9);65 $version = mt_rand(1, 5) .".". mt_rand(1, 9) ."." . mt_rand(1,9); 66 66 67 67 // force head/post methods to return 403, nginx default behavior -
bitfire/trunk/src/storage.php
r3212327 r3250641 244 244 245 245 // 1% of the time clean up old lock files 246 if ( random_int(1,100) == 50) {246 if (mt_rand(1,100) == 50) { 247 247 trace("CLEAN_LOCKS"); 248 248 $files = glob($base_dir."/*"); … … 255 255 256 256 if (!empty($fp) && is_resource($fp)) { 257 return flock($fp, LOCK_EX | LOCK_NB, $block) ? $fp : null;257 return (flock($fp, LOCK_EX | LOCK_NB, $block)) ? $fp : null; 258 258 } 259 259 return null; … … 264 264 if ($sem != null) { 265 265 $t = gettype($sem); 266 if ($t == "resource" ) {266 if ($t == "resource" || CFG::str('lock_type', 'flock') == "flock") { 267 267 flock($sem, LOCK_UN); 268 268 } … … 308 308 case "shmop": 309 309 // strange case where some systems can get here with no _shmop 310 if ($this->_shmop != null ) {310 if ($this->_shmop != null && !empty($this->_shmop)) { 311 311 $tmp = $this->_shmop->read($key_name, $type); 312 312 $success = ($tmp !== NULL); … … 319 319 @include($file); 320 320 // remove expired data 321 if (!$success ) {321 if (!$success && stat($file) !== false) { 322 322 @unlink($file); 323 323 } -
bitfire/trunk/src/util.php
r3212327 r3250641 466 466 }; 467 467 } 468 468 469 469 470 /** … … 991 992 992 993 // write to a temp file, check it, then rename it atomically 993 $tmp_file = $file->filename . "." . random_int(0xFF, 0xFFFFFF);994 $tmp_file = $file->filename . "." . mt_rand(0xFF, 0xFFFFFF); 994 995 $written = file_put_contents($tmp_file, $file->content, $mods); 995 996 … … 1812 1813 1813 1814 1814 // only used in bot filter1815 // only used in bot-filter 1815 1816 function array_shuffle(array $in) : array { 1816 1817 $out = array(); 1817 1818 while(($m = count($in))>0) { 1818 $t = array_splice($in, random_int(0, $m) , 1);1819 $t = array_splice($in, mt_rand(0, $m) , 1); 1819 1820 $out[] = $t[0]??0; 1820 1821 } -
bitfire/trunk/uninstall.php
r2946833 r3250641 27 27 die("Uninstalling requires administrative privileges."); 28 28 } 29 else if (!function_exists("current_user_can")) { 30 die("WordPress error. Unable to determine user capabilities."); 31 } 29 32 30 33 // uninstall any .htaccess file changes or user.ini changes we might have made, -
bitfire/trunk/verify.php
r3212327 r3250641 185 185 } 186 186 187 /* 188 if (random_int(1,5) == 3) { 189 $result = "pass"; 190 $data['result'] = $result; 191 file_put_contents($info_file, en_json($data), LOCK_EX); 192 } 193 */ 194 187 195 188 //echo "event: status\n"; 196 189 echo "id: ". time() . "\n";
Note: See TracChangeset
for help on using the changeset viewer.