ナビゲーション
FrontPage
FreeBSD
Linux
Citrix XenServer
VMware ESXi
Unixコマンド
MySQL
PostgreSQL
Windows
CMS/CRM
クラウド
用語
PHPスクリプト
Bashシェルスクリプト
Rubyスクリプト
開発日記
検索
ツールボックス
新しいページの作成
バックアップの表示
外部のリンク元
最近更新したページ
全ページ
ヘルプ
凍結
アップロード
ページ名の変更
最新の40件
2016-08-17
Linux/NagiosQL
Linux/CentOSチューニング
2016-02-23
Linux/ソフトウェアRAID復旧手順
2016-02-18
FreeBSD/DHCP
FreeBSD/squid
2016-02-15
Unixコマンド/file
2016-02-05
FreeBSD/DynaBook
FreeBSD/Linux compatibility
2016-01-21
PHPスクリプト/PEAR DBインストールできない
PHPスクリプト/PEAR DB
2016-01-20
PHP/フレームワーク/Zend Framework
PHP/フレームワーク
FreeBSD/Postfix+amavisd+clamav
2016-01-15
FreeBSD/sl
2015-12-04
Unixコマンド/dig
Unixコマンド/nslookup
Unixコマンド/traceroute
Linux/rsync
FreeBSD/rsync
Unixコマンド/vipw
2015-11-25
Linux/Postfix+MySQL+Postfix AdminによるバーチャルSMTPサーバの構築
Linux/Postfix + postgrey
2015-11-24
Linux/Postfix + amavisd + clamav
2015-05-25
Unixコマンド/ifconfig
2015-05-23
Unixコマンド/netstat
Unixコマンド/route
Unixコマンド/lsof
Unixコマンド/disown
Unixコマンド/time
Unixコマンド/crontab
2015-05-22
Unixコマンド/nohup
Unixコマンド/fgとbg
Unixコマンド/nice
Unixコマンド/kill
Unixコマンド/jobs
Unixコマンド/restor
Unixコマンド/dump
Unixコマンド/uncompress
Unixコマンド/compress
Unixコマンド/zcat
total:
906
today:
1
yesterday:
0
now:
1
本文
ノート
?
編集
差分
一覧
Linux/suExecをバイナリ直接書き換え の編集
*suExecをバイナリ直接書き換え [#wd2a7f34] #contents **vimに付属のxxdを使って、バイナリファイルを編集できるようにする。 [#hc0842c3] "バイナリ編集(xxd)モード(vim -b での起動、もしくは *.bin で発動します) # vi ~/.vimrc -------- 下記を追加 -------- augroup BinaryXXD autocmd! autocmd BufReadPre *.bin let &binary =1 autocmd BufReadPost * if &binary | silent %!xxd -g 1 autocmd BufReadPost * set ft=xxd | endif autocmd BufWritePre * if &binary | %!xxd -r autocmd BufWritePre * endif autocmd BufWritePost * if &binary | silent %!xxd -g 1 autocmd BufWritePost * set nomod | endif augroup END **suexec書き換え [#ya2cd8e2] # cd /usr/sbin # cp suexec suexec.test # chmod u+w suexec.test # vi -b suexec.test 00022d0: 29 0a 00 2d 56 00 61 70 61 63 68 65 00 2f 76 61 )..-V.apache./va 00022e0: 72 2f 77 77 77 00 20 2d 44 20 41 50 5f 44 4f 43 r/www. -D AP_DOC ↓ 00022d0: 29 0a 00 2d 56 00 61 70 61 63 68 65 00 2f 68 6f )..-V.apache./ho 00022e0: 6d 65 00 00 00 00 20 2d 44 20 41 50 5f 44 4f 43 me.... -D AP_DOC 確認 # ./suexec.test -V -D AP_DOC_ROOT="/home" -D AP_GID_MIN=100 -D AP_HTTPD_USER="apache" -D AP_LOG_EXEC="/var/log/httpd/suexec.log" -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin" -D AP_UID_MIN=500 -D AP_USERDIR_SUFFIX="public_html"
タイムスタンプを変更しない
*suExecをバイナリ直接書き換え [#wd2a7f34] #contents **vimに付属のxxdを使って、バイナリファイルを編集できるようにする。 [#hc0842c3] "バイナリ編集(xxd)モード(vim -b での起動、もしくは *.bin で発動します) # vi ~/.vimrc -------- 下記を追加 -------- augroup BinaryXXD autocmd! autocmd BufReadPre *.bin let &binary =1 autocmd BufReadPost * if &binary | silent %!xxd -g 1 autocmd BufReadPost * set ft=xxd | endif autocmd BufWritePre * if &binary | %!xxd -r autocmd BufWritePre * endif autocmd BufWritePost * if &binary | silent %!xxd -g 1 autocmd BufWritePost * set nomod | endif augroup END **suexec書き換え [#ya2cd8e2] # cd /usr/sbin # cp suexec suexec.test # chmod u+w suexec.test # vi -b suexec.test 00022d0: 29 0a 00 2d 56 00 61 70 61 63 68 65 00 2f 76 61 )..-V.apache./va 00022e0: 72 2f 77 77 77 00 20 2d 44 20 41 50 5f 44 4f 43 r/www. -D AP_DOC ↓ 00022d0: 29 0a 00 2d 56 00 61 70 61 63 68 65 00 2f 68 6f )..-V.apache./ho 00022e0: 6d 65 00 00 00 00 20 2d 44 20 41 50 5f 44 4f 43 me.... -D AP_DOC 確認 # ./suexec.test -V -D AP_DOC_ROOT="/home" -D AP_GID_MIN=100 -D AP_HTTPD_USER="apache" -D AP_LOG_EXEC="/var/log/httpd/suexec.log" -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin" -D AP_UID_MIN=500 -D AP_USERDIR_SUFFIX="public_html"
テキスト整形のルールを表示する
ログインまたはアカウント作成