/CHANGELOG |
---|
8,9 → 8,9 |
- Add an additional BL : Malwares Command & Control servers (C&C) from "osint.bambenekconsulting.com/feeds/". Thanks to Sven RATH |
- Add IoT live capture (to detect private data leakage). Thanks to Dorian LEMOINE & Guillaume GELLUSSEAU |
ACC |
- sysinfo genrated by "phpsysinfo 3.3.2" |
- "sysinfo" is displayed with "phpsysinfo 3.3.2" |
- global flow statistics generated by "vnstat-dashboard" (instead of "vnstat-frontend") |
- choice between certificates (default / official / Let's encrypt) |
- Improve the process to import "official" and "Let's encrypt" certificates |
CHANGES |
- German translations have been updated. Thanks to Sven RATH |
- Improve RPMs controls at the installation stage |
/alcasar.sh |
---|
782,11 → 782,9 |
# Copy & adapt ACC files |
cp -rf $DIR_INSTALL/web/* $DIR_WEB/ |
$SED "s?99/99/9999?$DATE_SHORT?g" $DIR_ACC/menu.php |
# Waiting for new phpsysinfo special page |
#$SED "s?\$DB_RADIUS = .*?\$DB_RADIUS = \"$DB_RADIUS\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php |
#$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php |
#$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/phpsysinfo/includes/xml/portail.php |
#chmod 640 $DIR_ACC/phpsysinfo/includes/xml/portail.php |
$SED "s?\$DB_RADIUS = .*?\$DB_RADIUS = \"$DB_RADIUS\"\;?g" $DIR_ACC/welcome.php |
$SED "s?\$DB_USER = .*?\$DB_USER = \"$DB_USER\"\;?g" $DIR_ACC/welcome.php |
$SED "s?\$radiuspwd = .*?\$radiuspwd = \"$radiuspwd\"\;?g" $DIR_ACC/welcome.php |
chown -R apache:apache $DIR_WEB/* |
# copy & adapt "freeradius-web" files |
cp -rf $DIR_CONF/freeradius-web/ /etc/ |
/conf/fail2ban.sh |
---|
28,7 → 28,7 |
ignoreip = 127.0.0.1/8 |
# "bantime" is the number of seconds that a host is banned. |
bantime = 300 |
bantime = 180 |
# A host is banned if it has generated "maxretry" during the last "findtime" seconds. |
# Un client est banni s'il génere "maxretry" requêtes pendant "findtime" (en secondes) |
58,7 → 58,7 |
# but it will be logged as info. |
usedns = warn |
# Bannissement sur tous les ports après 2 refus d'Apache (tentative d'accès sur des pages inexistentes) |
# Bannissement sur tous les ports après 3 refus du serveur WEB (tentative d'accès sur des pages inexistentes) |
[alcasar_mod-evasive] |
#enabled = true |
67,7 → 67,7 |
filter = alcasar_mod-evasive |
action = iptables-allports[name=alcasar_mod-evasive] |
logpath = /var/log/lighttpd/access.log |
maxretry = 2 |
maxretry = 3 |
# Bannissement sur tout les ports après 3 refus de SSH (tentative d'accès par brute-force) |
[ssh-iptables] |
/scripts/alcasar-daemon.sh |
---|
62,7 → 62,7 |
echo "$nb_srv services needed by ALCASAR are started." |
fi |
if [ `lsmod|grep ipt_NETFLOW|wc -l` == 0 ] |
if [ `lsmod|grep ^ipt_NETFLOW|wc -l` == 0 ] |
then |
logger -t alcasar-daemon -i "ipt_netflow is inactive." |
echo "The Log system is disabled! try to know why (modprobe ipt_NETFLOW)" |
/web/acc/manager/vnstat.php |
---|
11,27 → 11,14 |
?> |
<!DOCTYPE html> |
<html> |
<header> |
<link rel="stylesheet" href="htdocs/style.css"> |
</header> |
<head> |
<link rel="stylesheet" href="/css/style.css"> |
</head> |
<body> |
<table border=0 cellspacing=0 cellpadding=0 class="tableTopACC"> |
<tbody class="tbodyAcc" > |
<tr> |
<th class="thBasicACC"> |
<?php echo $l_title; ?> |
</th> |
</tr> |
</tbody> |
<tr bgcolor="#FFCC66" class="trSizeACC"> |
<td class="tdSizeACC"> |
<img src="/images/pix.gif" width="1" height="2"> |
</td> |
</tr> |
</table> |
<div > |
<iframe class="ACCiframe" src="vnstat/index.php"> |
</iframe> |
<div class="panel"> |
<div class="panel-header"><?= $l_title ?></div> |
<iframe class="panel-iframe" src="vnstat/index.php"> |
</iframe> |
</div> |
</body> |
</html> |
/web/acc/menu.php |
---|
163,7 → 163,7 |
<div class="panel-row"> |
<div class="menu"> |
<ul> |
<li><div class="caret"></div><a href="phpsysinfo/" target="REXY2"><?= $l_home ?></a></li> |
<li><div class="caret"></div><a href="welcome.php" target="REXY2"><?= $l_home ?></a></li> |
<?php if ($right === 0): // admin ?> |
<li> |
<div class="caret"></div><a href="#"><?= $l_system ?></a> |
/web/acc/welcome.php |
---|
0,0 → 1,143 |
<?php |
# Welcome page (sysinfo) |
# by Rexy |
// request database |
function request ($texte) { |
$strResult = 0; |
// Déclaration des paramètres de connexion |
$host = "localhost"; |
$DB_USER = "radius"; |
$DB_RADIUS = "radius"; |
$radiuspwd = ""; |
// Connexion au serveur |
$mysqli = new mysqli($host, $DB_USER, $radiuspwd, $DB_RADIUS); |
if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";} |
else { $query = "SELECT GroupName FROM radusergroup GROUP BY GroupName";} |
$result = $mysqli->query($query); |
// Recuperation des resultats |
$strResult = $result->num_rows; |
// Deconnexion de la base de donnees |
$mysqli->close(); |
return $strResult; |
} |
// Internet test |
function internetTest() { |
$host = 'www.google.com'; |
$host2 = 'www.alcasar.net'; |
$port = 80; |
$sock = @fsockopen($host, $port, $errno, $errstr, 2); |
if ($sock) { |
fclose($sock); |
return true; |
} |
$sock = @fsockopen($host2, $port, $errno, $errstr, 2); |
if ($sock) { |
fclose($sock); |
return true; |
} |
return false; |
} |
// filtering test |
function filtrageTest($file, $search_regex){ |
$pointeur = fopen($file,"r"); |
$result = false; |
if ($pointeur) |
{ |
while (!feof($pointeur)) |
{ |
$ligne = fgets($pointeur); |
if (preg_match($search_regex, $ligne, $r)) |
{ |
$result = true; |
break; |
} |
} |
} |
fclose($pointeur); |
return $result; |
} |
$Language = 'en'; |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]), 0, 2)); |
} |
if ($Language === 'fr') { |
$l_title = "Bienvenue dans l'ACC (ALCASAR Control Center)"; |
$l_internet_link = "Connexion Internet"; |
$l_version = "Version instalée"; |
$l_available = "Version disponible"; |
$l_users = "Nombre d'utilisateurs / connectés"; |
$l_groups = "Nombre de groupes"; |
$l_bl_version = "Date de la blacklist"; |
} |
else { |
$l_title = "Welcome in ACC (ALCASAR Control Center)"; |
$l_internet_link = "Connexion Internet"; |
$l_version = "Installed version"; |
$l_available = "Available version"; |
$l_users = "Number of users / connected."; |
$l_groups = "Number of groups"; |
$l_bl_version = "Blacklist date"; |
} |
?> |
<!DOCTYPE html> |
<html> |
<head> |
<link rel="stylesheet" href="/css/style.css"> |
</head> |
<body> |
<div class="panel"> |
<div class="panel-header"><?= $l_title ?></div> |
<div class ="panel-row"> |
<div class="panel-cell"> |
<? |
// Read CONF_FILE |
define ('CONF_FILE', '/usr/local/etc/alcasar.conf'); |
$file_conf = fopen(CONF_FILE, 'r'); |
if (!$file_conf) { |
exit('Error opening the file '.CONF_FILE);} |
while (!feof($file_conf)) { |
$buffer = fgets($file_conf, 4096); |
if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) { |
$tmp = explode('=', $buffer, 2); |
$conf[trim($tmp[0])] = trim($tmp[1]); |
} |
} |
fclose($file_conf); |
// Get current version |
$INSTALLEDVERSION = $conf['VERSION']; |
$VERSIONBL = date ("F d Y", filemtime ('/etc/e2guardian/lists/blacklists/README')); |
$nb_users = request ('user'); |
$nb_groups = request ('group'); |
$nb_online_users = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l"); |
if ((filtrageTest("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) { |
$internet_status = "<img src='/images/state_ok.gif'>".$text['enable']; |
$version = dns_get_record("version.alcasar.net",DNS_TXT); |
$AVAILABLEDVERSION = $version[0]['txt']; |
} else { |
$internet_status = "<img src='/images/state_error.gif'>".$text['disable']; |
$AVAILABLEDVERSION = "-"; |
} |
echo $l_internet_link." : ".$internet_status."<br>\n"; |
echo $l_version." : ".$INSTALLEDVERSION."<br>\n"; |
echo $l_available." : ".$AVAILABLEDVERSION."<br>\n"; |
echo "</div><div class=\"panel-cell\">"; |
echo $l_users." : ".$nb_users." / ".$nb_online_users."<br>\n"; |
echo $l_groups." : ".$nb_groups."<br>\n"; |
echo $l_bl_version." : ".$VERSIONBL."<br>\n"; |
?> |
</div> |
</div> |
</div> |
<div class="panel"> |
<iframe class="panel-iframe" src="phpsysinfo/"> |
</iframe> |
</div> |
</body> |
</html> |
/web/css/style.css |
---|
125,3 → 125,19 |
border: 1px solid black; |
overflow: auto; |
} |
.panel .panel-iframe |
{ |
height: 150vh; |
width: 100%; |
margin: 0px 0px 0px 0px ; |
padding: 0px 0px 0px 0px ; |
display: flex; |
border-left-style: solid; |
border-left-width: 1px; |
border-right-style: solid; |
border-top-style: solid; |
border-top-width: 1px; |
border-bottom-style: solid; |
border-bottom-width: 1px; |
border-right-width: 1px; |
} |
/web/password.php |
---|
1,9 → 1,8 |
<?php |
# $Id$ |
# |
# change user password on ALACASAR NAC |
# Copyright (C) 2003, 2004 Mondru AB. |
# Copyright (C) 2008-20017 ANGEL95 & REXY |
# change user password on ALCASAR NAC |
# by ANGEL95 & Rexy |
/**************************************************************** |
* GLOBAL FILE PATHS * |