반응형

전체 글 368

Uncrackable 3 write up

Uncrackable 3 write upMainActivity다른 부분들에 대해서는 분석을 상세히 서술할 필요가 없을 것 같아, 필요한 부분들에 대해서만 간단히 짚고 넘어간다.package sg.vantagepoint.uncrackable3; ​ import android.app.AlertDialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.os.Debug; import android.os.SystemClock; import android.support.v7.app.AppCompatActivity; import android.util.Log; imp..

Write-up 2020.07.10

SDL_TTF 사용하기

SDL_TTF SDL이용해서 문자를 화면에 나타낼 수 있다.나는 화면에 스코어 나타내려고 사용했음.SDL_TTF installhttps://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zipSDL_TTF Usagehttps://gigi.nullneuron.net/gigilabs/displaying-text-in-sdl2-with-sdl_ttf/대충 다음처럼 함수만들어서 사용하면 편함. void Game::PaintText(char* str, int x, int y) { SDL_Color color = { 255, 255, 255 }; SDL_Surface * surface = TTF_RenderText_Solid(font, str, ..

gdb 활용 팁

gdb 활용 팁에버노트 정리하다가 끄적여논거 대충 써서 올려본다. 파일에 symbol이 존재하는 경우 디버깅시 매우 행복함을 느낄 수 있다.(gdb) x/x &변수명 같이 사용가능. 메모리 볼 때, vmmap 처럼(gdb) info proc mappings비슷하게 바이너리에 존재하는 함수 목록을 보고 싶으면 `info functions`을 이용해서 확인할 수도 있다. gdb.attach(r, 'b* 0x40~') 꼴로 중간에 gdb 디버깅을 사용하면, 브포를 특정 함수에 걸었을 때, 해당 함수 중간에 브포가 걸릴 수 있기 때문에 그럴 경우 finish를 사용해서 함수를 모두 실행시키면 깔끔하다.(gdb) finish 일반 gdb에서 heap 보려고 할 때, p main_arena.* 로 확인 가능.(gd..

glide (feat. custom dialog)

glide구글에서 지원하는 안드로이드에서 사용할 수 있는 오픈소스 미디어 프레임워크다.이거를 이용해서 png/gif 등의 다양한 이미지를 쉽게 업로드 할 수 있어 많이 사용된다고 한다.자세한 사항은 다음 링크를 참고 https://github.com/bumptech/glide다음은 glide를 사용하는 예제인데, 나는 AlertDialog에 gif 파일을 집어넣고 싶어서 glide를 사용했다.custom dialog를 만들고 그 안의 ImageView에 glide로 gif를 집어넣으면 된다.Usage우선 build.gradle (Module: app)에 존재하는 디펜던시 리스트에 다음과 같이 추가한다.dependencies { implementation 'com.github.bumptech.glide:g..

SSH Reverse tunneling

SSH Reverse tunnelingA : 192.168.41.160B : 192.168.41.157160의 방화벽에서 들어오는 22 포트를 막아버렸을 때, A에서 reverse ssh tunnel을 구축해놓으면 B에서 언제든지 열어놓은 ssh tunnel에 접근할 수 있다. ssh 명령어의 -R 옵션을 통해 사용할 수 있다.Ach4rli3kop at ubuntu in ~ $ ssh -R 12345:localhost:22 ch4rli3kop@192.168.41.157 ch4rli3kop@192.168.41.157's password: Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-45-generic x86_64) ​ * Documentation: https://h..

ufw 사용법

ufw 사용법기본적으로 input policy가 drop이기 때문에 /etc/default/ufw에서 다음과 같이 input policy를 accept로 바꿔준다. 1 # /etc/default/ufw 2 # 3 4 # Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback 5 # accepted). You will need to 'disable' and then 'enable' the firewall for 6 # the changes to take affect. 7 IPV6=yes 8 9 # Set the default input policy to ACCEPT, DROP, or REJECT. Please note that i..

반응형