2024-07-01から1ヶ月間の記事一覧

php 5.6 default_charset

調べてみたところ、Content-Type で指定される文字コードは、php.ini の default_charset というパラメーターで指定することになっているようです。PHP 5.6 からデフォルト値が空から "UTF-8" に変更されています。 今までは空だったため、特に Content-Type…

rsync ssh 踏み台経由

$ cat .ssh/config Host rsyncJmp User juser Hostname xxx.xxx.xxx.xxx port 2222 IdentityFile ~/.ssh/id_rsa Host rsyncHost Hostname yyy.yyy.yyy.yyy User ruser ProxyCommand ssh rsyncJmp -W %h:%p $ rsync -av ./file rsyncHost:/root/scp と rsync …

pecl memcache 3.0.8 PHP 5.6.40 FreeBSD 13.3

cd /usr/local/src/memcache-3.0.8 phpize --clean && phpize for f in `find . -type f \( -name config.libpath -o -name config.rpath -o -name configure -o -name libtool.m4 -o -name ltconfig -o -name libtool -o -name aclocal.m4 -o -name acinclu…

freebsd grep 遅い

I was about to open a new PR, but I realized the problem has already been reported, so I'm commenting here.My particular issue: fgrep -i is terribly slow on 13.0....Even in 12.3-STABLE, it was a bsdgrep issue :) > /usr/bin/time -l cat acce…

複数ファイルの置換 sed

bash (対象ファイルを変数にいれる) file_list=`ls /home/*/foo.txt | xargs grep -L baz` (対象ファイル確認) ls -p $file_list 2>/dev/null →対象ファイルがない場合は終了 (置換) ls -p $file_list 2>/dev/null | xargs sed -i.bak -e 's/bar/baz/g' (差…

zfs send recv incremental backup 差分バックアップ

-Fオプションによりrecv側は最新snapshotに強制rollbackして、それからsnapshotを受け取る。zfs snapshotの差分send/recvについて | nobwak's Lair 2014 zfs send -Ri "zdata/vm/test-vm@d-2024-07-21_03.56.00--7d" "zdata/vm/test-vm@d-2024-07-22_03.34.0…

bash ベストプラクティス

Bash スクリプトのベストプラクティス - goodbyegangsterのブログ 2024

vm-bhyve migration

vm-bhyve マイグレーションのコマンドが send/recv から migrate に変更。1.5.0https://gist.github.com/churchers/b5dc5ccb77d9096af56b84d0d1df20b9?permalink_comment_id=3715131#gistcomment-3715131↓ Reimplement the send/recv code as migrate I beli…

openvas Redis oom killed

I have a relatively small greenbone installation on Docker. This is built from community containers 22.4. the problem is when i start a scan around 90% crashes them because of the Linux kernel oom_kill. I get message in the kernel log: ...…

openvas slack通知

easiest is to monitor log files and then create slack alerts.https://forum.greenbone.net/t/alerts-configuration-slack-notification/5946/7 nagios nrpe check-logfileskali apt install nagios-nrpe-server nagios-nrpe-plugin monitoring-plugins-c…

ufw ログ

Solution: Configure rsyslog log message patterns Edit /etc/rsyslog.d/20-ufw.conf and uncomment the last line, leaving & stop there. This prevents the message from being logged into the syslog too. $ vim /etc/rsyslog.d/20-ufw.conf # Log ker…

GUARDIANWALL MailSuite

Let's Encrypt /usr/guardian/adm/httpd/conf/server.key /usr/guardian/adm/httpd/conf/server.crt /usr/guardian/adm/httpd/conf/server-ca.crt /usr/guardian/wgw/httpd/conf/server.key /usr/guardian/wgw/httpd/conf/server.crt /usr/guardian/wgw/http…

php compile patch

5.0 - 5.4https://github.com/hnw/phpall/tree/master/patches古いPHPをphp-buildでビルドする on El Capitan #PHP - Qiita 20175.3 - 8.0https://github.com/php-build/php-build/tree/master/share/php-build/patches

Ubuntu unattended-upgrades

Automatic security updates Starting with Ubuntu 16.04 LTS, unattended-upgrades is configured to automatically apply security updates daily. Earlier Ubuntu releases can be configured to automatically apply security updates.https://wiki.ubun…

Certificate Transparency ログ

SSL証明書を取得するとCTログという公開データベースにコモンネームが登録されるんだけど、これを常時監視してる奴がいて、Let's Encryptとかで証明書を取った瞬間に立ち上げたばかりのサイトを狙ってアクセスしてくる。(立ち上げた瞬間はパスワードがデフ…

FreeBSD pkg upgrade vulnerable, pkg audit

https://man.freebsd.org/cgi/man.cgi?query=pkg-upgrade -v, --vulnerable Upgrade packages which are known to be vulnerable. See pkg-audit(8) for more details. $ pkg -v 1.21.314.0-RELEASE-p8 + pkg 1.21.3 vulnerable なパッケージがない場合は、v…

GVM フィード

nvts cves cpes certbunds dfncertshttps://docs.greenbone.net/GCS-Manual/gcs/en/glossary.html NVT = Network Vulnerability Tests CVE = Common Vulnerabilities and Exposures (脆弱性識別子) ex. CVE-2024-6387 CPE = Common Platform Enumeration (共…

FreeBSD OpenSSH バージョン

リリース時点での OpenSSH バージョン FreeBSD バージョン リリース OpenSSH バージョン FreeBSD 12.4 2022 12/5 OpenSSH 9.1p1 FreeBSD 13.0 2021 4/13 OpenSSH 7.9p1 FreeBSD 13.1 2022 5/16 OpenSSH 8.8p1 FreeBSD 13.2 OpenSSH 9.3p1 FreeBSD 13.3 2024 …

SMTP Smuggling Sendmail CVE-2023-51765

SMTP実装の脆弱性(SMTP Smuggling) - SIOS SECURITY BLOG 2024 SEC Consultはこの問題の検証を容易にするため、ツールを「GitHub - The-Login/SMTP-Smuggling-Tools: Tools for finding SMTP smuggling vulnerabilities.」にて公開した。このツールを使用…

hosts.allow jp 国内 IP

python3 netmask (not CIDR)generate_hosts_allow_sshd_jp.py import sys import ipaddress def cidr_to_netmask(cidr): network = ipaddress.IPv4Network(cidr, strict=False) return str(network.netmask) data = sys.stdin.read() for line in data.split…

ipfw jp 国内 ip

APNIC アジア/太平洋圏 https://www.cman.jp/network/support/IP_list.htmlftp://ftp.apnic.net/pub/apnic/stats/apnic/delegated-apnic-latest curl -O ftp://ftp.apnic.net/pub/apnic/stats/apnic/delegated-apnic-latest cat delegated-apnic-latest | aw…

CVE-2024-6387 regreSSHion

CVE-2024-6387 OpenSSHの脆弱性 CVE-2024-6387についてまとめてみた - piyolog正 CVE-2024-6387 誤 CVE-2024-6378影響を受ける可能性があるOpenSSHバージョン 4.4p1(2006年9月7日リリース)より前 8.5p1(2021年3月3日リリース)〜9.8p1https://www.freebsd…