security

ネイティブコード以外の実行ファイルに対してsetuidが効かない件

ネットワークセキュリティHacks―プロが使うテクニック&ツール100選を読むまですっかり忘れていた。Cを使ういい機会なのでやってみる。TCPの321番ポートを開くだけのプログラム。まずはC. #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define ERROR(x</arpa/inet.h></netinet/in.h></sys/socket.h></stdlib.h></stdio.h>…