HOWTO: NULL Modem TCP/IP network connection between Linux and Windows

Linux PPP server
----------------

The first step is to install the pppd demon and optionally the mgetty to use it on dialup modem, but this howto only covers the null modem (serial) part.
Once installed you must to create the following files:

/etc/sysctl.conf

net.ipv4.ip_forward=1

/etc/ppp/options

[...]

NCN2k15 CTF "CivilWar" writeup

In the past NCN2k15, all CTF participants received these files: a png image and a ogg sound. Listening that sound it's easily to advert that this is encoded data. Also the image is like a real WWII crypt order.

As the order said, this probably is an encoded RTTY, morse or hellschreiber. Maybe enigm

[...]

HOWTO: Custom kernel and linux distro for ODROID-C

Prepare the environment

In this example i used a old gcc version, you can try the newer 4.8

wget https://releases.linaro.org/13.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.7-2013.
[...]

Qt Tutorial

This article is a introductory tutorial for the Qt language.

Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for se

[...]

OTPNitro project

OTP Nitro

About: OTP Nitro is a secure One Time Pad implementation to use on computers or as assistant on manual operations.

You can download it here:

CLI Usage

[...]

z/OS Install and configure RMF Distributed Data Server

Configure RMF Distributed Data Server:

PERMIT  BPX.DAEMON CLASS(FACILITY) ID(START2) ACCESS(READ)
RDEFINE APPL    GPMSERVE UACC(READ)
RDEFINE PROGRAM GPM*     ADDMEM('SYS1.SERBLINK'//NOPADCHK) UACC(READ)
RDEFINE PROGRAM ERB*     ADDMEM('SYS1.SERBLINK'//NOPADCHK) UACC(READ)
RDEFINE PROGRAM CEEBINIT ADDMEM('CEE.
[...]

z/OS SUBMIT JOBS in FTP

List datasets...

ftp> dir
200 Port request OK.
125 List started OK
 Name     VV.MM   Created       Changed      Size  Init   Mod   Id
HELLO     01.01 2013/10/22 2013/10/24 22:06    13    13     1 CAPI
HELLO2    01.02 2013/10/22 2013/10/24 22:06    13    12     5 CAPI
LISTDS    01.02 2013/10/22 2013/10/24 22:07    15    10     8 CAPI
[...]

z/OS CLIST tutorial (DRAFT)

CLIST

  1. Language definition:

1.0 Comments

/* THIS IS A COMMENT */

1.1 Header

    PROC 0          /* PROC [NUM PARAMETERS]            */
    PROC 1 XXXXXXXX /* New rutine PARAMETER1 = XXXXXXXX */

1.2 Variables

PROC 1 INPUT
SET VARIABLE = &INPUT
SET STRING = HELLO WORLD

1.3 Conditional

IF &VARIALBE = TEST THEN +
[...]

z/OS create user (DRAFT)

RACF panel parameters

Change Account      (ACCTNUM)  ACCT#________________________________
Change Logon Procedure Name       (PROC)  ISPFPROC
Change Command   (COMMAND)  ISPF____________________________________

User permits

TSO PE ACCT# CLASS(ACCTNUM) ID(WEBSRV) ACCESS(READ)
TSO PE ACCT  CLASS(TSOAUTH) ID(WEBSRV) ACCESS(READ)
T
[...]

z/OS SURROGAT manage

Search surrogates

    TSO SR CLASS(SURROGAT) NOMASK

List surrogat

    TSO RLIST SURROGAT BPX.SRV.WEBSRV [AUTHUSER]

Define and permit a surrogat

    TSO RDEFINE SURROGAT BPX.SRV.WEBSRV UACC(NONE)
    TSO PE BPX.SRV.WEBSRV CLASS(SURROGAT) ID(WEBSRV) ACCESS(READ)

Delete a surrogat

    TSO RDELETE SURROGAT BPX.SRV.WEBSRV  

Save changes

[...]

z/OS HTTPD server minimal users - install

Check if you have enabled surrogat on the system.

    SETROPTS CLASSACT(SURROGAT)

Ok, now you must create the WEBSRV user and define our surrogat.

ADDUSER  WEBSRV     DFLTGRP(IMWEB)  OMVS(UID(0) HOME('/usr/lpp/internet') PROGRAM('/bin/sh'))
RDEFINE  FACILITY   BPX.DAEMON      UACC(NONE)  NOTIFY(WEBSRV)
RDEFINE  FACILITY   BP
[...]

z/OS change TELNET (TN3270E) port addr

First is to locate the hlq.TCPPARMS (usually SYS1.TCPPARMS or ADCD.Z110.TCPPARMS for ADCD)
It must have the TN3270 member. This is an example:

TelnetGlobals
  INACTIVE 28800
  SMFINIT STD
  SMFTERM STD
  TIMEMARK 14400
  ScanInterval 3600
  MAXRECEIVE  65535
  MAXVTAMSENDQ 50
  TCPIPJOBNAME TCPIP
  ; lat
[...]

z/OS set timezone and manage daylight saving time (DST)

In z/OS > 1.8 you can use the MVS SET TIMEZONE command to set a new time for displaying entries (internal date is unchanged) and doesn't need an IPL.
We can use that for the daysaving hour change.

The first is change the SYS1.PARMLIB.CLOCK*XX* TIMEZONE value.

OPERATOR NOPROMPT
TIMEZONE W.12.00.00
ETRMODE  YES
[...]

Perfect console font (true type)

This font is really awesome!
http://www.dafont.com/perfect-dos-vga-437.font

Is ready in two versions, translated to windows encoding and on the original 437 form.

To install it on windows cmd you can use this reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mic
[...]

z/OS basic audit: launch DSMON and SETROPTS

A basic step on a z/OS and RACF audit is review a DSMON output.
The first is to create a JCL to launch DSMON and SUBMIT on a AUDITOR / SPECIAL user.

//DSMON    JOB CLASS=A,MSGLEVEL=(1,1),MSGCLASS=A
//********************************************************
//* LAUNCH DSMON                                         *
//*****
[...]

z/OS RACF basic user management

Delete a user:

  1. Search all datasets owned from this user:

    TSO SR CLASS(DATASET) MASK(USERXXX)
    
  2. Delete datasets (or if it have important data you can change the owner):

    TSO DD 'USERXXX.*'
    
  3. If have alias:

    TSO DELETE (USERXXX) ALIAS
    
  4. Delete user:

    TSO DELUSER USERXXX
    

View users:

  1. View all users
[...]

z/OS ISPF HOWTO - Allocate a new dataset

Allocate new dataset (=3.2)

ISPF Library:
   Project  . . USER____
   Group  . . . JCL_____
   Type . . . . DSMON___

Option ===> A________________

Parameters:

Data Set Name  . . . : USER.JCL.DSMON

Management class . . . ________       (Blank for default management class)
Storage class  . . . . ______
[...]

z/OS DB2 DBVisualizer (and other java) support

DBVisualizer by default doesn't supports DB2 databases running on z/OS mainframe.
When you try to connect it can throw this error:

    [jcc][t4][10109][10354][3.57.82] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to QDB2 databases.
    To connect to this server, please obtain a licensed c
[...]

z/OS DB2 SQLERRMC=SQLTABLES fix

If when you connect to your DB2 database can see this error:

    DB2 SQL Error: SQLCODE=-443, SQLSTATE=38112, 
    SQLERRMC=SQLTABLES;SQLTABLES;-805

Probably you have an error on the stored procedures. You can rebuild all procedures and databases running the DSNTIJSG DB2 installation JOB.

This JOB is located in this dataset:
**DSNXX

[...]

FreeBSD: Quick and dirty VM disk resize guide

0. Resize virtualbox disk image

    PS> C:\"Program Files"\Oracle\VirtualBox\VboxManage.exe modifyhd "E:\VirtualBox VMs\FreeBSD\FreeBSD.vdi" --resize 30000

1. boot the VM from the FreeBSD ISO

    [Press F12 -> c]

2. Fix [CURRUPT]

    # gpart recover ada0

3. Delete SWAP slide

    # gpart delete
[...]

Android: adb install Failure INSTALL_PARSE_FAILED_NO_CERTIFICATES

Note: This is a quick and dirty workarround to fix this error

C:>f:adb install 26-signed.apk

| 132 KB/s (2712034 bytes in 20.062s)
|        pkg: /data/local/tmp/26-signed.apk
| Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

**C:> "C:\rogram Files\Java\jdk1.7.0_15\bin\keytool.exe" -genkeypair -keyalg

[...]

Signal analysis tutorial (introduction)

First we did an introduction to Arduino, showing how to read and write an EEPROM.
Now therefore we will talk about signal analysis.

It usually starts like this: "Oh well... this is a interesting signal" xD The example I will show is the typical case of anyone who plays with signals, radio, etc... one day just

[...]

Enable ASLR, PIE, RELRO, NX-Stack on FreeBSD (and hardening)

At now FreeBSD (9.0-RELEASE) does not have ASLR support by default, in this article we will teach you to patch the kernel to add ASLR support, recompile the kernel, install and configure the new sysct subset for ASLR random space tunning.

To start we need to have the system source (kernel) installed in: /usr/src/sys
I

[...]

Leer y escribir EEPROM desde Arduino

Vamos a ver como leer y escribir en una EEPROM I2C utilizando las entradas analógicas de Arduino.
La EEPROM que he utilizado en el ejemplo es una 24LC256, podéis ver más información en su datasheet.

El esquema de conexiones con Arduino es el siguiente:
[![](http://www.haibane.or

[...]

Antenas para HF - parte II

Como continuación de la parte I hablaremos de otros tipos de antenas.

Antena EWE

La antena EWE es en esencia una antena cuadrada donde uno de los brazos resuena en tierra.
Se suele utilizar en las bandas 160m y 80m donde no se dispone de espacio para un dipolo o un hilo largo.

 ,------------------------------,
 |            
[...]

Antenas para HF - parte I

Hoy voy a hablar un poco sobre radio, ese viejo olvidado.
Para empezar hablaremos sobre dos tipos de antenas básicos, el dipolo y el hilo largo.

Dipolo

El dipolo es la antena básica por excelencia, el dipolo consta de dos ramas que en total miden extendidas la longitud de onda ( λ ) deseada para su mayor ganancia (y ROE 1, que es el ideal) el

[...]

Trucos para auditar apps de iOS

Hoy vamos a hablar de unos truquitos básicos para auditar aplicaciones de iOS.
No es que sea la panacea, pero seguro que a alguno le ahorra unos minutitos de buscar en Internete :-)

Si disponemos del código fuente del aplicativo podemos cargarlo en Xcode y ejecutarlo en el emulador iOS para hacer las pruebas en dinámico. [![](http://www.haibane.o

[...]

Publicamos un 0-Day de InterScan Web Security Suite (IWSS)

Todo empieza en una tarde de auditoría. Después de un buen plato de callos uno se siente especialmente inspirado para jugar un poco con cositas tontas y tal vez darle la vuelta a una auditoría un poco sosa. Buscamos ficheros con setuid bit para root, aunque nunca sale nada… oh wait…

Nos encontramos con: “/opt/trend

[...]

Probando nuestra shellcode en OSX Lion

Ahora que se ha publicado OSX Lion (10.7) hemos decidido probar nuestras shellcodes preparadas para Snow Leopard en 64bits sin cambiar ni un solo opcode. :-) El resultado es el esperado, las shellcodes se ejecutan sin problemas (cuidado con el stack-protector)
Pero en el proceso nos hemos encontrado un par de cosas curiosas.

Por

[...]

Benchmark: gcc vs clang

Today we will play with compilers.

On OSX we find gcc and llvm installed on the system (latest Xcode) and of course, we must compare them :^)

We will use the software nbench-byte-2.2.3:
**GCC


TEST : Iterations/sec. : Old Index : New Index : : Pentium 90* :

[...]

OSX Shellcode writing tutorial (64 bits)

In the previous post we learned to make a 32-bit shellcode. In this post we will make the 64 bits version.
We imagine that the 64-bit parameters are as in FreeBSD and they are using syscall. So far so good... Let's go!

This is our famous "hello girls", but this time are a little different, and the string fit in one record ;-)

[...]

How-to make an 32-bit OSX shellcode

We will make a basic shellcode (setuid + fork + execve wait4 +) for 32-bit Intel architecture. The first is to check the syscall.h file.

    Kana:osx capi_x$ cat /usr/include/sys/syscall.h

    #ifdef __APPLE_API_PRIVATE
    #define SYS_syscall        0
    #define SYS_exit           1
    #define SYS_fork           2
[...]