UNDERCODE COMMUNITY
2.67K subscribers
1.23K photos
31 videos
2.65K files
79.9K links
πŸ¦‘ Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

✨ Web & Services:
β†’ Undercode.help
Download Telegram
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.
instagram.com/UndercOdeTestingCompany

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹

Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.

1) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz

2) find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz

3) and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install

4) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""

5) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''

6) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!

7) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz
I find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz
and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install

8) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""

9) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''

10) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!

Written by UndercOde
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ How to set up a basic OpenLDAP Server full by Underc 0de
>how to install and set up OpenLDAP centralized within a company's e-mail address book server for client queries. Basically, OpenLDAP is also used in many other areas, like centralized user account authentication servers, but email address book queries are the most commonly used.
instagram.com/UndercOdeTestingCompany

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) go to www.openldap.org download the latest openldap package, follow the steps to compile and install, and then click Run:


#tar cvfz openldap-stable-20010524.tgz
#cd openldap-2.0.11
# / the configure.
#Make the depend
#make
#make test
#make install

2) My operating environment is redhat 6.1. If no errors are encountered, the LDAP daemon slapd is installed by default in the directory / usr / local / libexec; the configuration file is in the directory / usr / local / etc / openldap / and put various OpenLDAP tools
ldapadd, ldapdelete, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch in the directory

3) / usr / local / bin, and the runtime database in / usr / local / var / openldap-ldbm.

πŸ¦‘ Settings

1) Change the configuration file /usr/local/etc/openldap/slapd.conf
and add the following line after the include /usr/local/etc/openldap/schema/core.schema line to include all the schemes.

include /usr/local/etc/openldap/schema/corba.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include / usr / local /etc/openldap/schema/java.schema
include /usr/local/etc/openldap/schema/krb5-kdc.schema
include /usr/local/etc/openldap/schema/misc.schema
include / usr / local / etc / openldap / schema / nadf.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema

2) "ldbm database definitions" in file slapd.conf Partially change the corresponding
suffix, the rootdn line is as follows

database ldbm
suffix "o = yourdomain, c = us"
rootdn "cn = root, o = yourdomain, c = us"
rootpw secret
directory / usr / local / var / openldap-ldbm

> has a variety of formats you can use, here I use o = yourdomain, c = us to indicate the format of your company domain name and country or region rootdn after installation, the default is cn = Manager, changing to root here is completely your own preference, which is in line with the tradition that root has the highest permissions in Unix / Linux.

3) Now you can start slapd and run / usr / local / libexec / slapd.

You can consider adding / usr / local / bin and / usr / local / libexec to the search path, which is added to the PATH line in
/ etc / profile
:
PATH = "$ PATH: / usr / X11R6 / bin: / usr / local / bin: / usr / local / libexec "
so you only need to type slapd after the next login.

4) Test whether the ldap server is working properly.
Run the following command to check if there is corresponding output.

#ldapsearch -x -b "o = yourdomain, c = us" "(objectclass = *)"


5) Edit the .ldif text file and use ldapadd to add records to the LDAP database.
The content of the file is as follows:

dn: o = yourdomain, c = us
objectclass: dcobject
objectclass: organization
o: yourdomain
dc: yourdomain

DN: CN = jephe Wu, yourdomain = O, C = US
objectClass: inetOrgPerson
CN: Wu jephe
Sn: Wu
mail: jephe_wu@yourdomain.com


...... More Users ......

1) and so on, is added per Personal records enter this file. Note that the object type inetorgperson must have at least cn and sn. Here we use three definitions: cn, sn, and mail. This is sufficient for our email address book function. You can also define things like mobile, homephone, pager ... and so on.

2) Then use the following command to add the above .ldif file into the LDAP database

#ldapadd -x -D "cn = root, o = yourdomain, c = us" -w secret -f
"yourldiffilename"

Note: the first part of the above file " dn: o = yourdomain, c = us "is required, otherwise you cannot add data. Replace "yourdomain" above with your company's domain name.

3) Set Outlook Express to allow LDAP server to query email addresses.
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Introduction to common Linux network security tools by UnderCode
pinterest.com/UnderCodeOfficial

πŸ¦‘LETS START:

1) Although various versions of Linux distribution comes with a lot of free open-source software, but there are still a large number of useful tools are not default.
γ€€γ€€
2) Included in their installation CDs are, in particular, some toolkits that can enhance Linux network security, and most of them are also open source free software.

πŸ¦‘ Here is a brief introduction to several tools to enhance Linux network security.

1) sudo
γ€€γ€€ sudo is a program used by system administrators to allow some users to run some / all system commands as root. An obvious use is to enhance the security of the site. If you need to do some daily work as root every day and often execute some fixed commands that can only be executed by root, then sudo is very suitable for you.
sudo's homepage is at: http://www.courtesan.com/courtesan/products/sudo/
γ€€γ€€
2) Take Redhat as an example, the following describes the installation and setup process:
γ€€γ€€
3) First, you can download the rpm package for Redhat Linux from the sudo homepage.
It's at ftp://ftp.freshmeat.net/pub/rpms/sudo/ currently the latest stable version 1.5.9p4.

4) γ€€Execute #rpm -ivh sudo * to install, then edit / etc / sudoers file with / usr / sbin / visudo.

5) If you are prompted that you cannot find / usr / bin / vi but you actually have the vi program in the directory / bin, you need
ln -sf / bin / vi / usr / bin / vi creates a symbolic link for vi under / usr / bin. (Note: I encountered this on Redhat 6.1, and this problem does not exist on Redhat 5.x)
γ€€γ€€
6) In addition, if some other error occurs, you may also need #chmod 700 / var / run / sudo

πŸ¦‘ Below is my / etc / sudoers Example file:
[root @ sh-proxy / etc] # more sudoers
Host_Alias ​​SERVER = sh-proxy

# User alias specification

User_Alias ​​ADMIN = jephe, tome

# Cmnd alias specification

Cmnd_Alias ​​SHUTDOWN = / etc / halt, / etc / shutdown, / etc / reboot

ADMIN SERVER = SHUTDOWN
jephe SERVER = / usr / bin / tail -f / var / log / maillog
jephe SERVER = / usr / bin / tail -f / var / log / messages

# User privilege specification
root ALL = (ALL) ALL
-----------

1) Since I often need to log in to the server remotely to observe the changes in the email log file / var / log / maillog, I added this line to / etc / sudoers so that I do n’t need to log in as root to complete my daily work and improve safety.

2) Sniffit Sniffit
γ€€γ€€is a well-known network port probe. You can configure it to run in the background to detect which TCP / IP ports the user's input / output information is on.
γ€€
3) The most commonly used function is that an attacker can use it to detect the data transfer on your 23 (telnet) and 110 (pop3) ports to easily get your login password and mail account password. Sniffit is basically used by the vandal. Tools, but if you want to know how to enhance the security of your site, you should first know the various tools used by intruders.

4) sniffit's homepage is at http://reptile.rug.ac.be/~coder/sniffit/sniffit.html You can download the latest version from there. Installation is very easy, just run #tar xvfz sniff * solution in the root directory Open all files to the corresponding directory.


Written by UndercOde
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Miscellaneous Tools-Recover Deleted Files in ext2 File System :
twitter.com/UnderCodeNews

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) if you accidentally accidentally deleted an important file, such as rm -rf kkk And kkk is a very important file for you, you must be very painful, at this time you must not panic, you should stop writing any files to your hard disk immediately. It is completely recoverable. (I wrote the following specifically for the ext2 file system, other file systems have methods, I will write later):
#debugfs / dev / hda1 (the partition where the deleted file is located)
debugfs: lsdel
can list your recent The inode table of the deleted file is roughly as follows:

2) Inode Owner Mode Size Blocks Time deleted

3) This is the node table number, owner, file attributes (that is, read, write, etc.), size, block (generally 1block = 1K), when deleted time. With this information, you should be able to quickly determine which file you want to recover. Then use
debugfs: dump <the value of the inode table you want to restore> / home / directory (to that directory)
OK! It's that simple, you can find it in / home / directory.

4) Of course, if you have a lot of files, doing this one by one is definitely troublesome, you can download some tools. I give it here:
http://revocer.sourceforge.net/linux/recover.
Everyone, try it. If you have any difficulties, please send here,

5) During the practice of the brothers, such information appeared, and they did not know how to deal with it. Please enlighten me.
311543 0 100600 7603556 14/14 Wed Oct 2 18:39:21 2002
586046 0 100644 7044 2/2 Wed Oct 2 18:51:50 2002
760593 0 100600 363 1/1 Wed Oct 2 18:53:35 2002
9551 deleted inodes found.
debugfs: dump 311543
dump: Usage: dump_inode [-p] <file> <output_file>
debugfs: dump 311543 / root
311543: File not found by ext2_lookup
debugfs:

6)wants to restore this 311543 because I am in the / root directory I deleted a file, I saw it was 311543, but using the following command to restore, the above prompt appeared

7) You should be like this.

Debugfs: dump <311543> / root / ppp (any file name).
Try again . Did you

succeed?

8) I am now under windows, and my linux is JFS. Recovery is more convenient. Etc. Will I switch to LINUX and build an ext2 system, I have tried it before, and it must be


9) ok . Dude is terrific, serve it, and it will be OK. . . .
Now my brother has a question: I deleted a .tar.gz file, but after the restoration is complete, I cannot use
#tar zxvf * tar.gz to extract it.

10) The other is how to restore the original file name. For example, I deleted wine.tar.gz, but I ca n’t remember what the specific file name is, but I want to restore the original file name, such as I deleted important files in the system, but I don't remember what kind of file name it is, but this file name is extremely important to the system, such as mozilla under / usr / bin. How can I do this? ?

11) The main reason is to know why. The answer is simple. To know the file name, use
debugfs: ls -d.

12) As for the file cannot be used, it is because the dump is a continuous block, and your file may not be a continuous block.
Use debugfs: stat <inode> to see its status, and then dd them down one by one (of course there are tools to save a lot of effort).

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Sniffit :


1) sniffit is a well-known network port detector, you can configure it to run in the background to detect which Tcp / ip port user input / output information.

2) The most commonly used function is that an attacker can use it to detect the data transmission on your 23 (telnet) and 110 (pop3) ports to easily get your login password and mail account password. Sniffit is basically used by vandals.

3) Tools, but since you want to know how to enhance the security of your site, first of all you should know the various tools used by intruders.


4) The homepage of sniffit can be downloaded from git , the installation is very easy, just run #tar xvfz sniff * solution in the root directory Open all files to the corresponding directory.

5) You can run sniffit -i to view all input / output information on the specified network interface in an interactive graphical interface.

πŸ¦‘For example: in order to get the pop3 account and password entered by all users when they receive mail through a certain interface abcd, you can run
#sniffit -p 110 -t abcd &
#sniffit -p 110 -s abcd &
record files in the directory / usr / doc / sniffit * below:

6) The log file is named according to the visitor's IP address, random high-end port number, and the network interface IP address and detection port used for detection. It takes advantage of the inherent weakness of the tcp / ip protocol, because the user name and password information transmitted by ordinary telnet and pop3 are plain text, without any encryption.

7) So for telnet / ftp. You can use ssh / scp instead. The ssh / scp information detected by sniffit is basically a bunch of garbled characters, so you do n’t need to worry about the username and password information sent by ssh being stolen by a third party.

written by undercode
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁