본문 바로가기

Echo

맥 SSH 터미널 재실행 sudo launchctl stop com.openssh.sshdsudo launchctl start com.openssh.sshdsudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist sudo launchctl list | grep ssh 더보기
소스에서 특정 문자열 찾기 https://kldp.org/node/78418find . -name "*.php" -print | xargs egrep -rnoI "sms" | morexargs를 이용하면 다수의 리스트를 핸들링 할 수 있다.egrep을 하면 포함되고 있는 파일 이름을 알 수 있다.r 옵션은 서브리스트, n - 라인 넘버, o 는 모르겠고-I(대문자 i) : 매칭된 데이터를 포함하지 않는것처럼 바이너리 파일을 처리한다. binary-files=without-match 옵션과 동등하다 더보기
run and compile 32bit apps on 64bit ubuntu $ cat /etc/issueUbuntu 14.04.3 LTS \n \lsudo dpkg --add-architecture i386sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386sudo apt-get install gcc-multilib ksg@ubuntu:~/test$ uname -aLinux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linuxksg@ubuntu:~/test$ gcc -m32 -o test test.cksg@ubuntu:~/test$ file t.. 더보기
pwntools 설치 sudo apt-get install python-pip, python-dev -ysudo pip install pwntoolstest -> $ python -c 'from pwn import *' 더보기
IDA 원격 디버깅 (Attach, Run) Attach는 실행 중인 프로세스에 디버깅을 잡을 수 있다.자식 프로세스를 생산하는 프로그램에 유용할 수 있다. Run는 파일을 실행시키면서 바로 디버깅을 시작 한다.일반적으로 쓰는 원격 디버깅 방법이다. 6.6 기준 -IDA 6.6\dbgsrv 위치에( 윈도우, 안드로이드+ARM, 리눅스, 맥 ) 환경에 리모트 디버깅이 가능하게 돼있다.일단 scp, or sz/rz 명령어를 이용해서 linux_server를 리눅스 서버에 드랍한다. ( 환경에 따라 파일을 옮기면 된다. )$ chmod +x ./linux_server$ ./linux_server -P123이렇게 치면 패스워드가 '123'으로 원격 디버깅 서버가 실행 된다. ( -p는 포트다. ) 이제 윈도우에서 IDA를 키고 Debugger Run or.. 더보기