Skip to content

Instantly share code, notes, and snippets.

View mafiuss's full-sized avatar
:octocat:
AppSec & Cloud Protection

Benigno Gutierrez mafiuss

:octocat:
AppSec & Cloud Protection
View GitHub Profile

Disclosure policy. Define the procedure for what a reporter who finds a security issue needs to do in order to fully disclose the problem safely, including who to contact and how. Consider HackerOne’s community edition or simply a ‘security@’ email.

Security Update policy. Define how you intend to update users about new security vulnerabilities as they are found.

Security related configuration. Settings users should consider that would impact the security posture of deploying this project, such as HTTPS, authorisation and many others.

@mafiuss
mafiuss / localhostcrt
Created January 18, 2019 20:36
openssl crt for localhsot
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext
@mafiuss
mafiuss / localhostsslkey
Created January 18, 2019 20:34
private key using openssl csr.cnf
openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config <( cat server.csr.cnf )
@mafiuss
mafiuss / v3.ext
Created January 18, 2019 20:28
X509 v3
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
@mafiuss
mafiuss / CSR
Created January 18, 2019 20:25
Certificate Signing Request
[req]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = dn
[dn]
C=MX
ST=Jalisco
L=GDL
@mafiuss
mafiuss / gist:5dd95796549718af9422038fb95eedf6
Created January 18, 2019 20:18
Key and certificate for localhost
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
### Keybase proof
I hereby claim:
* I am mafiuss on github.
* I am benigno (https://keybase.io/benigno) on keybase.
* I have a public key ASD-7DHKddgYtIsGI9uRB6DOQMbDKIEbog9gTh1EC2fZ-Ao
To claim this, I am signing this object:
@mafiuss
mafiuss / gist:00548ceb50ac8e6008ad
Last active August 29, 2015 14:06
Node installation in Debian 7
$(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p')
fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install
dpkg -i node_*_amd64.deb
var fs = require('fs');
var file = __dirname + '/test.json';
fs.readFile(file, 'utf8', function (err, data) {
if (err) {
console.log('Error: ' + err);
return;
}
data = JSON.parse(data);
@mafiuss
mafiuss / gist:d47b9520e4d565cd702c
Created June 27, 2014 19:51
Install mongodb in Debian 7
# followed instructons in http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
# experienced issues detailed in https://groups.google.com/forum/#!topic/mongodb-user/qA6VSKuQIvc
# so Iused the init.d/mongod script found in https://github.com/mongodb/mongo/blob/master/debian/init.d